|
|
|
|
|
by ajdecon
4259 days ago
|
|
I really think there are no good reasons to include build tools in a docker image. The author lists three possible reasons: - you need a specific version (e.g. redis is pretty old in the Debian repositories). - you need to compile with specific options. - you will need to npm install (or equivalent) some modules which compile to binary. But you can avoid all of these by building your own DEB/RPM packages and installing those into the container. This might make the container less "whitebox", in that the Dockerfile no longer contains the full steps to reproduce the built image from public sources. But having an internal package repository makes a lot of sense, and not just for building small Docker images. Keeping your own package repository helps make your server builds more reproducible in general, and provides clean mechanisms for performing updates on your own software as well as third-party packages. (edited for formatting) |
|