Lamp ou amp why debian?


I’m new in docker and i have a question.

I would like to build my php environnment with php mariadb and apache.

So i saw on docker hub some peoples who published some images with debian apache mysql php but this is not more interesting to remove debian and create only an image with php and apache and another image for mysql and no debian.

What is the aim to keep debian ?

I hope ma question is enough clear and thanks for answering :slight_smile:

There are pre-built binary packages of a lot of software for Debian (and Ubuntu), and so it is very easy to build an image of a Debian base plus a specific other piece of software.

Certainly there’s no requirement to have a base Linux distribution, and it’s at least somewhat common to have a Docker image that consists of only a statically linked Go program and nothing else at all. If your application needs niceties like a shell or the Linux C library, though, it can be much easier to get those parts from a prebuilt distribution than to assemble them yourself.

(Also the fascination with Alpine-based images, which have a much smaller footprint; and the corresponding oddity of Alpine-based images that then install a full heavyweight C toolchain.)

1 Like