Skip to content

Commit 2536a9b

Browse files
Update Dockerfile.redhat
1 parent 5972dda commit 2536a9b

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

Dockerfile.redhat

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,14 @@ ARG JOBS=16
359359
#RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared
360360

361361
RUN mkdir -p /tmp/bazel-output && \
362-
bazel --output_base=/tmp/bazel-output \
363-
${CAPI_FLAGS} \
364-
build --jobs=${JOBS} //src:ovms_shared && \
365-
find /tmp/bazel-output -name libovms_shared.so && \
366-
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
367-
echo "Found built file: $LIB_PATH" && \
368-
mkdir -p /ovms_release/lib && \
369-
cp -v "$LIB_PATH" /ovms_release/lib/
362+
bash -c '\
363+
set -euo pipefail && \
364+
bazel --output_base=/tmp/bazel-output \
365+
build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared && \
366+
LIB_PATH=$(find /tmp/bazel-output -name libovms_shared.so | head -n1) && \
367+
echo "Found built file: $LIB_PATH" && \
368+
mkdir -p /ovms_release/lib && \
369+
cp -v "$LIB_PATH" /ovms_release/lib/'
370370

371371
# C api app with bazel
372372
# hadolint ignore=DL3059
@@ -383,12 +383,14 @@ RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
383383
find $(bazel info bazel-bin)/src -type f -name capi_benchmark
384384

385385
RUN mkdir -p /tmp/bazel-output && \
386-
bazel --output_base=/tmp/bazel-output \
387-
build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
388-
CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
389-
echo "Found built capi_benchmark: $CAPI_BIN" && \
390-
chmod +x "$CAPI_BIN" && \
391-
"$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"
386+
bash -c '\
387+
set -euo pipefail && \
388+
bazel --output_base=/tmp/bazel-output \
389+
build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && \
390+
CAPI_BIN=$(find /tmp/bazel-output -type f -name capi_benchmark | head -n1) && \
391+
echo "Found built capi_benchmark: $CAPI_BIN" && \
392+
chmod +x "$CAPI_BIN" && \
393+
"$CAPI_BIN" --niter 2 --nstreams 1 --servable_name "dummy"'
392394

393395
# C-api C/C++ app with gcc
394396
COPY MakefileCapi /ovms/

0 commit comments

Comments
 (0)