3 ms·
The author sort of mentions this: > The image size can be made smaller, for example with multi-stage builds, but that means even more work. ...which I really
by yjftsjthsd-h 7y ago
The author sort of mentions this:
> The image size can be made smaller, for example with multi-stage builds, but that means even more work.
...which I really don't find compelling, honestly. If you want a smaller image, then yes, you need to do one of the major things that produces smaller images. Don't install a whole dev chain, leave it in the image, and then complain that your image is big.
- jrockway 7y agoI think the advice of "ship gcc and its dependencies to production to avoid writing 2 extra lines in your Dockerfile" is pretty awful advice. Less stuff in your containers means faster image pulls and less attack surface. Seems crazy not to do it. FROM clean-image, COPY --from=base-image ... I am guessing with Python the difficulty is in enumerating what files you need to copy, because there's more than one. But I am sure that can be figured out exactly once and you can save yourself some time and money on unnecessary data transfer.