Last active
August 8, 2023 17:30
-
-
Save osher/68e289b3102d15f05c79b125252970fa to your computer and use it in GitHub Desktop.
Example for the Dockerfile for node-services using an multi-phase build with optimized node-builder and node-runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG TAG_NODE_BUILDER=latest | |
FROM my-private-cr/node-builder:$TAG_NODE_BUILDER | |
COPY packge.json . | |
RUN npm i --production | |
ARG TAG_NODE_RUNNER=latest | |
FROM my-private-cr/node-runner:$TAG_NODE_RUNNER | |
COPY --from=0 /app / | |
COPY . /app/ | |
RUN apk update --no-cache | |
&& apk upgrade --no-cache | |
&& rm -r /**/apk /**/**/apk | |
USER service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment