4 ms·
The point of the && in a Dockerfile is because every single RUN directive adds another layer to the final image. Less layers = slimmer images = faster and light
by syntheticcdo 8y ago
The point of the && in a Dockerfile is because every single RUN directive adds another layer to the final image. Less layers = slimmer images = faster and lighter deploys.
- aib 8y agoYes. Also, the only thing that survives between RUN directives is the disk image so && saves state: start-daemon && configure-daemon-while-running && stop-daemon The point is, I've seen far more && than RUN directives so the decision was backwards.