Skip to content

Commit 64ec83d

Browse files
Update Dockerfile.redhat
1 parent 991f2d9 commit 64ec83d

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

Dockerfile.redhat

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,15 @@ ARG JOBS=16
339339
#RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared
340340

341341
RUN mkdir -p /tmp/bazel-output && \
342-
bazel --output_base=/tmp/bazel-output \
343-
build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
344-
find /tmp/bazel-output -name libovms_shared.so && \
345-
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
346-
echo "Found built file: $LIB_PATH" && \
347-
mkdir -p /ovms_release/lib && \
348-
cp -v "$LIB_PATH" /ovms_release/lib/
342+
bash -c '\
343+
set -euo pipefail && \
344+
bazel --output_base=/tmp/bazel-output \
345+
build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
346+
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
347+
echo "Found built file: $LIB_PATH" && \
348+
mkdir -p /ovms_release/lib && \
349+
cp -v "$LIB_PATH" /ovms_release/lib/'
350+
349351

350352
# C api app with bazel
351353
# hadolint ignore=DL3059
@@ -361,13 +363,17 @@ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
361363
bazel info bazel-bin && \
362364
find $(bazel info bazel-bin)/src -type f -name capi_benchmark
363365

366+
364367
RUN mkdir -p /tmp/bazel-output && \
365-
bazel --output_base=/tmp/bazel-output \
366-
build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
367-
CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
368-
echo "Found built capi_benchmark: $CAPI_BIN" && \
369-
chmod +x "$CAPI_BIN" && \
370-
"$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
368+
bash -c '\
369+
set -euo pipefail && \
370+
bazel --output_base=/tmp/bazel-output \
371+
build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
372+
CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
373+
echo "Found built capi_benchmark: $CAPI_BIN" && \
374+
chmod +x "$CAPI_BIN" && \
375+
"$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"'
376+
371377

372378
# C-api C/C++ app with gcc
373379
COPY MakefileCapi /ovms/

0 commit comments

Comments
 (0)