3 ms·
Building in a container gives you the portability benefit of having tools installed in a container. But not building in your productiom container makes it smal
by paulddraper 8y ago
Building in a container gives you the portability benefit of having tools installed in a container.
But not building in your productiom container makes it smaller.
Dockerfiles can actually do both, via "mutli-stage builds". You can build in one container and in the same Dockerfiles copy files from that build container to your final container.
Some take a really extreme stance where the production container has nothing superfluous, not even a shell.
https://github.com/GoogleContainerTools/distroless https://github.com/GoogleContainerTools/distroless