Skip to content

Commit

Permalink
move debug stage above production
Browse files Browse the repository at this point in the history
suggestion: move graph-node-debug stage above the production stage graph-node

For those that don't use --target then they will always get the production image by default

This also helps for those building from Docker Hub Cloud where a target can't be specified
  • Loading branch information
computeronix authored and lutter committed Sep 7, 2022
1 parent 2f9a82d commit 67952b6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ RUN cd /graph-node \
&& echo "CARGO_VERSION='$(cargo --version)'" >> /etc/image-info \
&& echo "RUST_VERSION='$(rustc --version)'" >> /etc/image-info

# Debug image to access core dumps
FROM graph-node-build as graph-node-debug
RUN apt-get update \
&& apt-get install -y curl gdb postgresql-client

COPY docker/Dockerfile /Dockerfile
COPY docker/bin/* /usr/local/bin/

# The graph-node runtime image with only the executable
FROM debian:buster-slim as graph-node
ENV RUST_LOG ""
Expand Down Expand Up @@ -82,11 +90,3 @@ COPY --from=graph-node-build /usr/local/cargo/bin/graph-node /usr/local/cargo/bi
COPY --from=graph-node-build /etc/image-info /etc/image-info
COPY docker/Dockerfile /Dockerfile
CMD start

# Debug image to access core dumps
FROM graph-node-build as graph-node-debug
RUN apt-get update \
&& apt-get install -y curl gdb postgresql-client

COPY docker/Dockerfile /Dockerfile
COPY docker/bin/* /usr/local/bin/

0 comments on commit 67952b6

Please sign in to comment.