Closed hydrargyrum closed 2 years ago
We base our image on (here) php:8.1-fpm
. We don't want to remove more package than the ones already included in the base image.
Maybe someone will create a new image based on Monica's image. They should be able to assume all packages from the base image are present, no less.
If you'd like to clean up the php:8.1-fpm
image, then you can create an issue here: https://github.com/docker-library/php
Thanks
@asbiin
Maybe someone will create a new image based on Monica's image. They should be able to assume all packages from the base image are present, no less.
I don't agree. Monica docker image is not a "library", it's supposed to be production-ready image, it's designed to be used "as is", so it should only contain what should be present in production. Else your production-ready image is open to more vulnerabilities, etc.
We don't want to remove more package than the ones already included in the base image.
If someone wants to build something on monica image, they should install themselves what's required. It's not your responsibility, it's theirs. On the contrary, php:8.1-fpm is a library image, it's not designed to be used "as is", so it's normal for it to have more stuff. This is confirmed by their reply: https://github.com/docker-library/php/issues/1324#issuecomment-1218265532
I see in the
fpm/Dockerfile
some effort is made to remove unused packages. But inspecting the resulting image, some packages seem questionable for a production image, for exampleautoconf
,make
,m4
,curl
(command-line tool),dpkg-dev
,gcc
. Those would be acceptable for an build-stage image where only required stuff would be installed/copied in the production-stage image. Furthermore, cleaning unused packages from a build-stage image would be pointless, so the apt-mark part would not be needed.For reference: