@@ -46,9 +46,10 @@ ENV CARGO_HOME=${CARGO_HOME}
46
46
ARG FEATURES
47
47
ENV FEATURES=${FEATURES}
48
48
49
- ARG SHORT_SHA
50
- # If this is not set, it must be an empty string, so Zebra can try an alternative git commit source:
49
+ # If this is not set, it must be an empty string, so Zebra can try an
50
+ # alternative git commit source:
51
51
# https://github.com/ZcashFoundation/zebra/blob/9ebd56092bcdfc1a09062e15a0574c94af37f389/zebrad/src/application.rs#L179-L182
52
+ ARG SHORT_SHA
52
53
ENV SHORT_SHA=${SHORT_SHA:-}
53
54
54
55
# This stage builds tests without running them.
@@ -79,7 +80,7 @@ RUN addgroup --quiet --gid ${GID} ${USER} && \
79
80
WORKDIR ${HOME}
80
81
81
82
# Build Zebra test binaries, but don't run them
82
-
83
+ #
83
84
# Leverage a cache mount to /usr/local/cargo/registry/
84
85
# for downloaded dependencies, a cache mount to /usr/local/cargo/git/db
85
86
# for git repository dependencies, and a cache mount to ${HOME}/target/ for
@@ -132,11 +133,10 @@ COPY --chown=${UID}:${GID} ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh
132
133
133
134
ENTRYPOINT [ "entrypoint.sh" , "test" ]
134
135
135
- # In this stage we build a release (generate the zebrad binary)
136
+ # This stage builds the zebrad release binary.
136
137
#
137
- # This step also adds `cache mounts` as this stage is completely independent from the
138
- # `test` stage. This step is a dependency for the `runtime` stage, which uses the resulting
139
- # zebrad binary from this step.
138
+ # It also adds `cache mounts` as this stage is completely independent from the
139
+ # `test` stage. The resulting zebrad binary is used in the `runtime` stage.
140
140
FROM deps AS release
141
141
142
142
ARG HOME
@@ -163,8 +163,8 @@ RUN --mount=type=bind,source=tower-batch-control,target=tower-batch-control \
163
163
cargo build --locked --release --features "${FEATURES}" --package zebrad --bin zebrad && \
164
164
cp ${HOME}/target/release/zebrad /usr/local/bin
165
165
166
- # This step starts from scratch using Debian and only adds the resulting binary
167
- # from the `release` stage.
166
+ # This stage starts from scratch using Debian and copies the built zebrad binary
167
+ # from the `release` stage along with other binaries and files .
168
168
FROM debian:bookworm-slim AS runtime
169
169
170
170
ARG FEATURES
0 commit comments