Skip to content

Commit a0221d1

Browse files
committed
Dockerfiles: wrap at 80 chars
1 parent cb3593c commit a0221d1

File tree

11 files changed

+126
-53
lines changed

11 files changed

+126
-53
lines changed

Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FROM rust:bullseye AS build
22
# hadolint ignore=DL3008
3-
RUN apt-get update && apt-get install -y --no-install-recommends protobuf-compiler && apt-get clean
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends protobuf-compiler && \
5+
apt-get clean
46
RUN rustup default 1.84 && rustup component add rustfmt
57
WORKDIR /openmina
68
COPY . .
@@ -12,22 +14,30 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
1214

1315
RUN --mount=type=cache,target=/usr/local/cargo/registry \
1416
--mount=type=cache,target=/openmina/target,id=rust-target \
15-
cargo build --release --features scenario-generators --bin openmina-node-testing && \
17+
cargo build --release --features scenario-generators \
18+
--bin openmina-node-testing && \
1619
cp -r /openmina/target/release /openmina/testing-release-bin/
1720

1821
# necessary for proof generation when running a block producer.
19-
RUN git clone --depth 1 https://github.com/openmina/circuit-blobs.git \
20-
&& rm -rf circuit-blobs/berkeley_rc1 circuit-blobs/*/tests
22+
RUN git clone --depth 1 \
23+
https://github.com/openmina/circuit-blobs.git && \
24+
rm -rf circuit-blobs/berkeley_rc1 circuit-blobs/*/tests
2125

2226
FROM debian:bullseye
2327
# hadolint ignore=DL3008
24-
RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc2 libssl1.1 libpq5 curl jq procps && apt-get clean && rm -rf /var/lib/apt/lists/*
28+
RUN apt-get update && \
29+
apt-get install -y --no-install-recommends \
30+
libjemalloc2 libssl1.1 libpq5 curl jq procps && \
31+
apt-get clean && \
32+
rm -rf /var/lib/apt/lists/*
2533

2634
COPY --from=build /openmina/release-bin/openmina /usr/local/bin/
27-
COPY --from=build /openmina/testing-release-bin/openmina-node-testing /usr/local/bin/
35+
COPY --from=build /openmina/testing-release-bin/openmina-node-testing \
36+
/usr/local/bin/
2837

2938
RUN mkdir -p /usr/local/lib/openmina/circuit-blobs
30-
COPY --from=build /openmina/circuit-blobs/ /usr/local/lib/openmina/circuit-blobs/
39+
COPY --from=build /openmina/circuit-blobs/ \
40+
/usr/local/lib/openmina/circuit-blobs/
3141

3242
EXPOSE 3000
3343
EXPOSE 8302

docker/producer-dashboard/Dockerfile

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN SQLX_OFFLINE=true cargo install --path .
1010
FROM ubuntu:noble AS mina-builder
1111

1212
# hadolint ignore=DL3008
13-
RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates
13+
RUN apt-get update && \
14+
apt-get install -y --no-install-recommends openssl ca-certificates
1415

1516
# Build mina from source
1617
# hadolint ignore=DL3008
@@ -41,15 +42,17 @@ RUN apt-get update && \
4142
rsync
4243

4344
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
44-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
45+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
46+
sh -s -- -y
4547

4648
WORKDIR /go
4749
RUN git clone https://github.com/MinaProtocol/mina.git
4850

4951
ENV DUNE_PROFILE=devnet
5052

5153
WORKDIR /go/mina
52-
COPY ../docker/producer-dashboard/output_binprot_breadcrumbs.patch .
54+
COPY ../docker/producer-dashboard/output_binprot_breadcrumbs.patch \
55+
.
5356
RUN git checkout 3.0.1 && \
5457
git submodule update --init --recursive && \
5558
git config --local --add submodule.recurse true
@@ -58,7 +61,10 @@ RUN git apply ./output_binprot_breadcrumbs.patch
5861

5962
# RUN make libp2p_helper
6063

61-
RUN curl -s -L https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux -o /usr/local/bin/opam && chmod +x /usr/local/bin/opam
64+
RUN curl -s -L \
65+
https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux \
66+
-o /usr/local/bin/opam && \
67+
chmod +x /usr/local/bin/opam
6268

6369
# hadolint ignore=DL3008
6470
RUN apt-get -y --no-install-recommends install m4 pkg-config
@@ -69,26 +75,35 @@ RUN opam init --disable-sandboxing && \
6975
opam switch import -y opam.export && \
7076
./scripts/pin-external-packages.sh
7177

72-
RUN curl -L https://go.dev/dl/go1.19.linux-amd64.tar.gz -o go1.19.tar.gz \
73-
&& tar -C /usr/local -xzf go1.19.tar.gz \
74-
&& rm go1.19.tar.gz
78+
RUN curl -L https://go.dev/dl/go1.19.linux-amd64.tar.gz \
79+
-o go1.19.tar.gz && \
80+
tar -C /usr/local -xzf go1.19.tar.gz && \
81+
rm go1.19.tar.gz
7582
ENV PATH="/usr/local/go/bin:${PATH}"
7683
RUN make libp2p_helper
7784

7885
ENV PATH="/root/.cargo/bin:${PATH}"
7986
# hadolint ignore=DL3008
8087
RUN apt-get -y --no-install-recommends install zlib1g-dev
8188
RUN eval "$(opam config env)" && make build_all_sigs
82-
# RUN /bin/bash -c "source ~/.cargo/env && eval $(opam config env) && make build_all_sigs"
89+
# RUN /bin/bash -c "source ~/.cargo/env && eval $(opam config env) && \
90+
# make build_all_sigs"
8391

8492
FROM ubuntu:noble
8593

8694
# hadolint ignore=DL3008
87-
RUN apt-get update && apt-get install -y --no-install-recommends libpq5 libjemalloc2 && rm -rf /var/lib/apt/lists/*
88-
89-
COPY --from=app-builder /usr/local/cargo/bin/openmina-producer-dashboard /usr/local/bin/openmina-producer-dashboard
90-
COPY --from=mina-builder /go/mina/src/app/libp2p_helper/result/bin/libp2p_helper /usr/local/bin/coda-libp2p_helper
91-
COPY --from=mina-builder /go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe /usr/local/bin/mina
95+
RUN apt-get update && \
96+
apt-get install -y --no-install-recommends libpq5 libjemalloc2 && \
97+
rm -rf /var/lib/apt/lists/*
98+
99+
COPY --from=app-builder /usr/local/cargo/bin/openmina-producer-dashboard \
100+
/usr/local/bin/openmina-producer-dashboard
101+
COPY --from=mina-builder \
102+
/go/mina/src/app/libp2p_helper/result/bin/libp2p_helper \
103+
/usr/local/bin/coda-libp2p_helper
104+
COPY --from=mina-builder \
105+
/go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe \
106+
/usr/local/bin/mina
92107

93108
# TODO: replace
94109
ENTRYPOINT [ "openmina-producer-dashboard" ]

frontend/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM node:18 AS BUILD_IMAGE
2-
# Doesn't matter what we put here - it get's overwritten by the docker build command
2+
# Doesn't matter what we put here - it get's overwritten by the docker \
3+
# build command
34
ARG BUILD_CONFIGURATION=production
45
WORKDIR /app
56
COPY . .
67
RUN npm install && \
7-
node_modules/.bin/ng build --configuration ${BUILD_CONFIGURATION} && \
8+
node_modules/.bin/ng build --configuration \
9+
${BUILD_CONFIGURATION} && \
810
npm prune --production && \
911
echo "---------- USING APACHE ----------"
1012

@@ -16,8 +18,10 @@ RUN apt-get update && \
1618
apt-get install -y --no-install-recommends curl && \
1719
rm -rf /var/lib/apt/lists/*
1820

19-
COPY --from=BUILD_IMAGE /app/dist/frontend/browser /usr/local/apache2/htdocs/
20-
COPY --from=BUILD_IMAGE /app/httpd.conf /usr/local/apache2/conf/httpd.conf
21+
COPY --from=BUILD_IMAGE /app/dist/frontend/browser \
22+
/usr/local/apache2/htdocs/
23+
COPY --from=BUILD_IMAGE /app/httpd.conf \
24+
/usr/local/apache2/conf/httpd.conf
2125

2226
COPY docker/startup.sh /usr/local/bin/startup.sh
2327
RUN chmod +x /usr/local/bin/startup.sh

node/testing/docker/Dockerfile.debugger

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ FROM minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley
66
COPY --from=debugger /usr/bin/bpf-recorder /usr/bin/bpf-recorder
77

88
# hadolint ignore=DL3008
9-
RUN apt-get update && apt-get -y install --no-install-recommends libelf-dev && rm -rf /var/lib/apt/lists/*
9+
RUN apt-get update && \
10+
apt-get -y install --no-install-recommends libelf-dev && \
11+
rm -rf /var/lib/apt/lists/*

node/testing/docker/Dockerfile.light

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ RUN apt-get update && \
3737
liblmdb-dev
3838

3939
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
40-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
40+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
41+
sh -s -- -y
4142

4243
WORKDIR /go
4344
RUN git clone https://github.com/MinaProtocol/mina.git
@@ -51,7 +52,10 @@ RUN git checkout -b 2.0.0rampup4 2.0.0rampup4 && \
5152

5253
RUN make libp2p_helper
5354

54-
RUN curl -s -L https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux -o /usr/local/bin/opam && chmod +x /usr/local/bin/opam
55+
RUN curl -s -L \
56+
https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux \
57+
-o /usr/local/bin/opam && \
58+
chmod +x /usr/local/bin/opam
5559

5660
RUN opam init --disable-sandboxing \
5761
&& opam switch create . \
@@ -65,9 +69,14 @@ RUN git apply patch
6569

6670
SHELL ["/bin/bash", "-c"]
6771

68-
RUN source ~/.cargo/env && eval "$(opam config env)" && make build_all_sigs
72+
RUN source ~/.cargo/env && eval "$(opam config env)" && \
73+
make build_all_sigs
6974

7075
FROM minaprotocol/mina-daemon:2.0.0rampup4-14047c5-buster-berkeley
7176

72-
COPY --from=builder /go/mina/src/app/libp2p_helper/result/bin/libp2p_helper /usr/local/bin/coda-libp2p_helper
73-
COPY --from=builder /go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe /usr/local/bin/mina
77+
COPY --from=builder \
78+
/go/mina/src/app/libp2p_helper/result/bin/libp2p_helper \
79+
/usr/local/bin/coda-libp2p_helper
80+
COPY --from=builder \
81+
/go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe \
82+
/usr/local/bin/mina

node/testing/docker/Dockerfile.light.focal

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ RUN apt-get update && \
3737
liblmdb-dev
3838

3939
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
40-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
40+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
41+
sh -s -- -y
4142

4243
WORKDIR /go
4344
RUN git clone https://github.com/MinaProtocol/mina.git
@@ -51,7 +52,10 @@ RUN git checkout -b 2.0.0rampup4 2.0.0rampup4 && \
5152

5253
RUN make libp2p_helper
5354

54-
RUN curl -s -L https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux -o /usr/local/bin/opam && chmod +x /usr/local/bin/opam
55+
RUN curl -s -L \
56+
https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux \
57+
-o /usr/local/bin/opam && \
58+
chmod +x /usr/local/bin/opam
5559

5660
RUN opam init --disable-sandboxing \
5761
&& opam switch create . \
@@ -65,9 +69,14 @@ RUN git apply patch
6569

6670
SHELL ["/bin/bash", "-c"]
6771

68-
RUN source ~/.cargo/env && eval "$(opam config env)" && make build_all_sigs
72+
RUN source ~/.cargo/env && eval "$(opam config env)" && \
73+
make build_all_sigs
6974

7075
FROM minaprotocol/mina-daemon:2.0.0rampup4-14047c5-focal-berkeley
7176

72-
COPY --from=builder /go/mina/src/app/libp2p_helper/result/bin/libp2p_helper /usr/local/bin/coda-libp2p_helper
73-
COPY --from=builder /go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe /usr/local/bin/mina
77+
COPY --from=builder \
78+
/go/mina/src/app/libp2p_helper/result/bin/libp2p_helper \
79+
/usr/local/bin/coda-libp2p_helper
80+
COPY --from=builder \
81+
/go/mina/_build/default/src/app/cli/src/mina_testnet_signatures.exe \
82+
/usr/local/bin/mina

node/testing/docker/Dockerfile.openmina

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
FROM ubuntu:20.04 AS builder
22

33
ENV TZ=UTC
4-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
4+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
5+
echo $TZ > /etc/timezone
56
# hadolint ignore=DL3008
67
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
7-
apt-get -y install --no-install-recommends git curl gcc libssl-dev pkg-config && \
8-
rm -rf /var/lib/apt/lists/*
8+
apt-get -y install --no-install-recommends git curl gcc libssl-dev \
9+
pkg-config && \
10+
rm -rf /var/lib/apt/lists/*
911

1012
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
11-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
13+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
14+
sh -s -- -y
1215

1316
RUN source ~/.cargo/env && rustup update 1.84
1417

node/testing/docker/Dockerfile.test

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ FROM vladsimplestakingcom/mina-openmina-builder:focal AS builder
33

44
RUN git fetch && git checkout feat/tests-with-debugger
55

6-
RUN . ~/.cargo/env && cargo +1.84 build --release -p openmina-node-testing --bin runner --bin openmina-node-testing
6+
RUN . ~/.cargo/env && cargo +1.84 build --release \
7+
-p openmina-node-testing --bin runner --bin openmina-node-testing
78

89
FROM vladsimplestakingcom/mina-debugger:2.0.0rampup4-focal
910

10-
COPY --from=builder /openmina/target/release/runner /usr/local/bin/runner
11-
COPY --from=builder /openmina/target/release/openmina-node-testing /usr/local/bin/openmina-node-testing
11+
COPY --from=builder /openmina/target/release/runner \
12+
/usr/local/bin/runner
13+
COPY --from=builder /openmina/target/release/openmina-node-testing \
14+
/usr/local/bin/openmina-node-testing
1215

1316
ENV BPF_ALIAS="3c41383994b87449625df91769dff7b507825c064287d30fada9286f3f1cb15e-0.0.0.0"

tools/bootstrap-sandbox/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
FROM rust:1.84.0-bullseye AS builder
22

3-
RUN mkdir -p ~/.ssh && chmod 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
3+
RUN mkdir -p ~/.ssh && \
4+
chmod 0700 ~/.ssh && \
5+
ssh-keyscan github.com >> ~/.ssh/known_hosts
46

57
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
68

7-
RUN cargo install --git https://github.com/openmina/openmina.git --branch fix/bootstrap-replay openmina-bootstrap-sandbox --locked
9+
RUN cargo install \
10+
--git https://github.com/openmina/openmina.git \
11+
--branch fix/bootstrap-replay \
12+
openmina-bootstrap-sandbox --locked
813

914
FROM debian:bullseye
1015

1116
# hadolint ignore=DL3008
12-
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev && rm -rf /var/lib/apt/lists/*
17+
RUN apt-get update && \
18+
apt-get install -y --no-install-recommends libssl-dev && \
19+
rm -rf /var/lib/apt/lists/*
1320

1421
COPY --from=builder /usr/local/cargo/bin/openmina-bootstrap-sandbox \
1522
/usr/local/bin/openmina-bootstrap-sandbox

tools/fuzzing/Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ RUN apt-get -y update && \
3939

4040
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4141

42-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
43-
RUN yes "" | sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
42+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
43+
sh -s -- -y
44+
RUN yes "" | \
45+
sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
4446
RUN ARCH=$(uname -m) && \
4547
if [ "$ARCH" = "aarch64" ]; then \
4648
ARCH="arm64"; \
@@ -50,9 +52,11 @@ RUN ARCH=$(uname -m) && \
5052
echo "Unsupported architecture: $ARCH" && exit 1; \
5153
fi && \
5254
rm -rf /usr/local/go && \
53-
curl -sSL https://go.dev/dl/go1.19.5.linux-"$ARCH".tar.gz | tar -C /usr/local -xzf -
55+
curl -sSL https://go.dev/dl/go1.19.5.linux-"$ARCH".tar.gz | \
56+
tar -C /usr/local -xzf -
5457
RUN export PATH=$PATH:/usr/local/go/bin
55-
RUN curl -sSL https://capnproto.org/capnproto-c++-0.10.2.tar.gz | tar -zxf -
58+
RUN curl -sSL https://capnproto.org/capnproto-c++-0.10.2.tar.gz | \
59+
tar -zxf -
5660
WORKDIR /capnproto-c++-0.10.2
5761
RUN ./configure && \
5862
make -j6 check && \
@@ -74,6 +78,8 @@ RUN source ~/.cargo/env && \
7478
export PATH=$PATH:/usr/local/go/bin && \
7579
export DUNE_PROFILE=devnet && \
7680
make libp2p_helper && \
77-
dune build src/app/transaction_fuzzer/transaction_fuzzer.exe --profile=devnet
78-
CMD ["/mina/_build/default/src/app/transaction_fuzzer/transaction_fuzzer.exe", "execute"]
81+
dune build src/app/transaction_fuzzer/transaction_fuzzer.exe \
82+
--profile=devnet
83+
CMD ["/mina/_build/default/src/app/transaction_fuzzer/transaction_fuzzer.exe", \
84+
"execute"]
7985

0 commit comments

Comments
 (0)