reduce a docker image when using nixpacks
thilllon
HOBBYOP

2 years ago

I am using nx, nestjs, nixpacks as a builder, and there is no Dockerfile in the project. Is there any idea or way to reduce docker image? like multi-stage docker build? https://docs.docker.com/build/building/multi-stage/

Without making a custom Dockerfile, just by the configuration of railway or nixpacks.

2 Replies

brody
EMPLOYEE

2 years ago

Absolutely, https://nixpacks.com/docs/configuration/file#start-phase
you can set the run image and then specify only the files you want to copy into it for a multi-stage build.

here's an example of this for a frontend Vue app.


thilllon
HOBBYOP

2 years ago

you saved my day!


Loading...