diff --git a/Dockerfile b/Dockerfile index c05e80c53..df16083c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,12 @@ # This is loosely based on `docker init`'s rust template. # For a completely clean build, run something like this: # ``` -# docker build --build-arg=PROFILE=dev --build-arg=ENTRYPOINT=leader --no-cache +# docker build --build-arg=PROFILE=dev --no-cache # ``` +# +# There is a build target[^1] for each artifact we want. +# +# [^1]: https://docs.docker.com/build/building/multi-stage/ ############# # Build stage @@ -71,10 +75,10 @@ find "/artifacts/$SUBDIR" \ EOF -################## -# Final executable -################## -FROM debian:bullseye-slim AS final +########################## +# Base for the final image +########################## +FROM debian:bullseye-slim AS base # Install runtime dependencies. RUN apt-get update && apt-get install -y \ @@ -84,23 +88,6 @@ RUN apt-get update && apt-get install -y \ tini \ && rm -rf /var/lib/apt/lists/* -COPY --from=build /output/* /usr/local/bin/ -RUN <