Replies: 2 comments
-
Most of the size from the frankenphp docker image comes from the php bookworm image it is based on (~175 MB -> ~190MB compressed). There is also a much smaller alpine version of frankenphp (~70 MB compressed), which sadly is not recommended at the moment though. In many cases the extra size of the operating system doesn't matter much tough, maybe it makes pulling and deploying the image a few seconds faster. I usually prefer alpine because it's minimalism makes it often safer from a security perspective. |
Beta Was this translation helpful? Give feedback.
-
I realize you ask "how come" but do you have a usecase for a smaller image? I see questions like this ever since Docker came out, but I can count with less than one hand where I've heard reasons that actually make sense.
If you can add to this list, let me know. Alpine has a lot of issues, such as DNS just up and randomly failing to work correctly and depending on which PHP function you are using it will depend on how it does DNS in the OS, which means it in one line everything is fine, but will fail on the next line (literally why we switched from Alpine in prod at work, a few months ago, after it happened on several production instances and caused a cascading failure). And then there's the fact that PHP doesn't actually test (at least not yet) musl libc (aka, alpine) and thus if things are broken, it isn't proactively fixed -- it has to be reported. And lastly, these library docker images (aka, the base images from |
Beta Was this translation helpful? Give feedback.
-
I don't understand why when building the frankenphp docker in prod weighs as much as an alpine custom docker php image.
How come it weighs around 700-800 mb :o? even empty?
Beta Was this translation helpful? Give feedback.
All reactions