Skip to content

Commit 657a366

Browse files
committed
RHAIENG-287: fix(Dockerfiles): use bash or printf to avoid Hadolint SC3037,SC3041 warning
``` ./jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu:19 SC3037 warning: In POSIX sh, echo flags are undefined. ./jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu:178 SC3041 warning: In POSIX sh, set flag -E is undefined. ./jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu:312 SC3041 warning: In POSIX sh, set flag -E is undefined. ./jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu:322 SC3041 warning: In POSIX sh, set flag -E is undefined. ./jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu:331 SC3041 warning: In POSIX sh, set flag -E is undefined. ./codeserver/ubi9-python-3.12/Dockerfile.cpu:288 SC3041 warning: In POSIX sh, set flag -E is undefined. ```
1 parent b88940f commit 657a366

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ FROM codeserver as tests
284284
ARG CODESERVER_SOURCE_CODE=codeserver/ubi9-python-3.12
285285
COPY ${CODESERVER_SOURCE_CODE}/test /tmp/test
286286
# TODO(jdanek): add --mount=type=bind,target=/opt/app-root/src
287-
RUN <<'EOF'
287+
RUN /bin/bash <<'EOF'
288288
set -Eeuxo pipefail
289289
python3 /tmp/test/test_startup.py 2>&1 | tee /tmp/test_log.txt
290290
EOF

jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN arch="${TARGETARCH:-$(uname -m)}" && \
2323
arch=$(echo "$arch" | cut -d- -f1) && \
2424
if [ "$arch" = "s390x" ]; then \
2525
echo "Skipping mongocli build for ${arch}, creating dummy binary"; \
26-
mkdir -p /tmp && echo -e '#!/bin/sh\necho "mongocli not supported on s390x"' > /tmp/mongocli && \
26+
mkdir -p /tmp && printf '#!/bin/sh\necho "mongocli not supported on s390x"' > /tmp/mongocli && \
2727
chmod +x /tmp/mongocli; \
2828
else \
2929
echo "Building mongocli for ${arch}"; \
@@ -177,7 +177,7 @@ FROM cpu-base AS common-builder
177177
ARG TARGETARCH
178178
# hadolint ignore=DL3002
179179
USER root
180-
RUN <<'EOF'
180+
RUN /bin/bash <<'EOF'
181181
set -Eeuxo pipefail
182182
if [ "${TARGETARCH}" = "ppc64le" ]; then
183183
dnf install -y gcc-toolset-13 cmake ninja-build git wget unzip
@@ -309,7 +309,7 @@ COPY --from=openblas-builder /root/OpenBLAS-${OPENBLAS_VERSION} /openblas
309309
COPY --from=onnx-builder /root/onnx_wheel/ /onnxwheels/
310310

311311
# Power-specific ONNX/OpenBLAS installation
312-
RUN <<'EOF'
312+
RUN /bin/bash <<'EOF'
313313
set -Eeuxo pipefail
314314
if [ "${TARGETARCH}" = "ppc64le" ]; then
315315
pip install --no-cache-dir /onnxwheels/*.whl
@@ -319,7 +319,7 @@ fi
319319
EOF
320320

321321
USER root
322-
RUN <<'EOF'
322+
RUN /bin/bash <<'EOF'
323323
set -Eeuxo pipefail
324324
if [ "${TARGETARCH}" = "ppc64le" ]; then
325325
rm -rf /onnxwheels
@@ -328,7 +328,7 @@ else
328328
fi
329329
EOF
330330

331-
RUN <<'EOF'
331+
RUN /bin/bash <<'EOF'
332332
set -Eeuxo pipefail
333333
if [ "${TARGETARCH}" = "ppc64le" ]; then
334334
PREFIX=/usr/local make -C /openblas install

0 commit comments

Comments
 (0)