DEV Community

Discussion on: How to speed up your daily Docker builds

Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga

That's pretty amazing! Would you use this to distribute applications inside docker images as well or only as runtimes for the code on your local disk? I'm only using containers as runtimes environments at the moment, using a lot of volumes, but I'm debating whether bundling the whole app inside if an image is better in any way.

Collapse
 
reiz profile image
Robert Reiz

Yes! I would use it to distribute applications inside of docker images. Actually that's what I'm doing. But if you use docker images to distribute your applications to customers then be careful not to leave secrets inside of the Docker image. Sometimes you need secret credentials at build time to fetch a package from a private repository for example. Even if you delete the secret during build time, it will stick around in the layers of the Docker image. To solve this problem you need docker multi-stage builds like described here: docs.docker.com/develop/develop-im...