alpine-node icon indicating copy to clipboard operation
alpine-node copied to clipboard

Consider moving to multi-stage build instead of a single-stage script

Open Qix- opened this issue 6 years ago • 1 comments

Iterative changes to this image are pretty painful I'd imagine 🙃

Now that Docker has multi-stage builds, it'd be pretty trivial to break out the single RUN into multiple layers, with an ultimate FROM alpine again in order to COPY --from all of the artifacts from the source build.

This would allow for proper Docker-ized layers whilst keeping the image size down since all of the intermediate layers of the original build step are omitted from the eventual docker push.

Might be worth considering :)

Qix- avatar Nov 09 '17 11:11 Qix-

The README has multi-stage builds https://github.com/mhart/alpine-node#example-dockerfile-for-your-own-nodejs-project

OmgImAlexis avatar Jun 04 '22 22:06 OmgImAlexis