Skip to content

Commit af39dc4

Browse files
committed
fix: quote cmd subst. to prevent word splitting in Dockerfiles
- Added quotes around $(opam config env) in all Dockerfiles - Fixes hadolint SC2046 warnings for proper shell quoting - Affects tools/fuzzing, node/testing/docker, and producer-dashboard Dockerfiles
1 parent a324a2d commit af39dc4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docker/producer-dashboard/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN apt-get -y --no-install-recommends install m4 pkg-config
6161

6262
RUN opam init --disable-sandboxing
6363
RUN opam switch create .
64-
RUN eval $(opam config env)
64+
RUN eval "$(opam config env)"
6565
RUN opam switch import -y opam.export
6666
RUN ./scripts/pin-external-packages.sh
6767

@@ -73,7 +73,7 @@ RUN make libp2p_helper
7373

7474
ENV PATH="/root/.cargo/bin:${PATH}"
7575
RUN apt-get -y --no-install-recommends install zlib1g-dev
76-
RUN eval $(opam config env) && make build_all_sigs
76+
RUN eval "$(opam config env)" && make build_all_sigs
7777
# RUN /bin/bash -c "source ~/.cargo/env && eval $(opam config env) && make build_all_sigs"
7878

7979
FROM ubuntu:noble

node/testing/docker/Dockerfile.light

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN curl -s -L https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-
5353

5454
RUN opam init --disable-sandboxing \
5555
&& opam switch create . \
56-
&& eval $(opam config env) \
56+
&& eval "$(opam config env)" \
5757
&& opam switch import -y opam.export \
5858
&& ./scripts/pin-external-packages.sh
5959

@@ -63,7 +63,7 @@ RUN git apply patch
6363

6464
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
6565

66-
RUN source ~/.cargo/env && eval $(opam config env) && make build_all_sigs
66+
RUN source ~/.cargo/env && eval "$(opam config env)" && make build_all_sigs
6767

6868
FROM minaprotocol/mina-daemon:2.0.0rampup4-14047c5-buster-berkeley
6969

node/testing/docker/Dockerfile.light.focal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN curl -s -L https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-
5353

5454
RUN opam init --disable-sandboxing \
5555
&& opam switch create . \
56-
&& eval $(opam config env) \
56+
&& eval "$(opam config env)" \
5757
&& opam switch import -y opam.export \
5858
&& ./scripts/pin-external-packages.sh
5959

@@ -63,7 +63,7 @@ RUN git apply patch
6363

6464
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
6565

66-
RUN source ~/.cargo/env && eval $(opam config env) && make build_all_sigs
66+
RUN source ~/.cargo/env && eval "$(opam config env)" && make build_all_sigs
6767

6868
FROM minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley
6969

tools/fuzzing/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ RUN git submodule update --init --recursive && \
6565
git checkout openmina/fuzzer
6666
RUN opam init --disable-sandboxing && \
6767
opam switch create .&& \
68-
eval $(opam config env) && \
68+
eval "$(opam config env)" && \
6969
opam switch import -y opam.export && \
7070
./scripts/pin-external-packages.sh
7171
RUN source ~/.cargo/env && \
72-
eval $(opam config env) && \
72+
eval "$(opam config env)" && \
7373
export PATH=$PATH:/usr/local/go/bin && \
7474
export DUNE_PROFILE=devnet && \
7575
make libp2p_helper && \

0 commit comments

Comments
 (0)