Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Most of their complaints about Docker, specifically:

  * The package manager is included in the image
  * The package manager’s database is included in the image
  * An entire copy of the C library is included in the image (even though the binary was statically linked to specifically avoid this)
Can be solved with Docker multi-stage builds[0]. This is essentially a separate build stage inside your single Dockerfile that sets up, builds, and creates artifacts. Those artifacts are then copied over into a later build stage. The resulting docker image is lean and yet the artifacts were built at docker build time, and its all contained in a single file.

0. https://docs.docker.com/develop/develop-images/multistage-bu...



The author did use a multi stage build.


A ridiculously slim multi-stage build, but it was starting to show its weaknesses.


My mistake, you're right. I'm thrown off by the idea of someone using a multi-stage build and still having those complaints. Just use/build a final base image that is lean enough for your needs. You're not forced to have any cruft you don't want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: