Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions share/vizd/docker/Dockerfile-production
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,20 @@ RUN --mount=type=cache,target=/root/.ccache,id=viz-ccache,sharing=locked \
make -j$(nproc) vizd && \
ccache -s

# `make install` would re-trigger the `all` target through CMake's install-depends-on-all
# rule, rebuilding cli_wallet, util programs, tests, and examples that were deliberately
# skipped by `make -j$(nproc) vizd` above. The runtime image only invokes
# /usr/local/bin/vizd (see share/vizd/vizd.sh), so we copy the single binary directly.
# `rm -rf $APPDIR` is unnecessary because the builder stage is discarded in multi-stage.
RUN set -xe ;\
cd $APPDIR/build ;\
make install ;\
rm -rf $APPDIR

# Final cleanup of the builder stage. apt cache mounts above are not affected
# by these rm/clean calls because cache mounts are unmounted by the time this
# RUN executes; this only removes anything that landed in real layers.
RUN \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/*
cp $APPDIR/build/programs/vizd/vizd /usr/local/bin/vizd

FROM phusion/baseimage:noble-1.0.3 AS production
COPY --from=builder /usr/local /usr/local
# Only the daemon binary is needed at runtime (see share/vizd/vizd.sh). Static link
# (-DBUILD_SHARED_LIBRARIES=FALSE) means no .so dependencies to ship. Copying just
# the binary instead of the entire builder /usr/local shrinks the runtime image and
# the layer graph exported to the GHA layer cache.
COPY --from=builder /usr/local/bin/vizd /usr/local/bin/vizd

RUN set -xe ;\
useradd -s /bin/bash -m -d /var/lib/vizd vizd ;\
Expand Down
23 changes: 11 additions & 12 deletions share/vizd/docker/Dockerfile-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,20 @@ RUN --mount=type=cache,target=/root/.ccache,id=viz-ccache,sharing=locked \
make -j$(nproc) vizd && \
ccache -s

# `make install` would re-trigger the `all` target through CMake's install-depends-on-all
# rule, rebuilding cli_wallet, util programs, tests, and examples that were deliberately
# skipped by `make -j$(nproc) vizd` above. The runtime image only invokes
# /usr/local/bin/vizd (see share/vizd/vizd.sh), so we copy the single binary directly.
# `rm -rf $APPDIR` is unnecessary because the builder stage is discarded in multi-stage.
RUN set -xe ;\
cd $APPDIR/build ;\
make install ;\
rm -rf $APPDIR

# Final cleanup of the builder stage. apt cache mounts above are not affected
# by these rm/clean calls because cache mounts are unmounted by the time this
# RUN executes; this only removes anything that landed in real layers.
RUN \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/*
cp $APPDIR/build/programs/vizd/vizd /usr/local/bin/vizd

FROM phusion/baseimage:noble-1.0.3 AS production
COPY --from=builder /usr/local /usr/local
# Only the daemon binary is needed at runtime (see share/vizd/vizd.sh). Static link
# (-DBUILD_SHARED_LIBRARIES=FALSE) means no .so dependencies to ship. Copying just
# the binary instead of the entire builder /usr/local shrinks the runtime image and
# the layer graph exported to the GHA layer cache.
COPY --from=builder /usr/local/bin/vizd /usr/local/bin/vizd

RUN set -xe ;\
useradd -s /bin/bash -m -d /var/lib/vizd vizd ;\
Expand Down
Loading