0

I already think I understand that docker containers "share" the same Linux kernel running on their host. But inside a particular docker container, the software stack could be a distro debian, alpine, centos or ubuntu and on top of that various other software components, such as a web server, database, language interpreter etc.

Indeed there are official images for such distros.

But there are also official images for Apache (httpd) and PHP (php)

My question is, how can I find out the default distro that these sit upon?

I ask, because for example, I've seen a Dockerfile which starts with:

FROM php:7.2-fpm (which is one of the official PHP images)

Followed by:

RUN apt-get update && apt-get install -y \ libfreetype6-dev \ libjpeg62-turbo-dev \ libpng-dev \ && docker-php-ext-install -j$(nproc) iconv \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install -j$(nproc) gd 

Source: hub.docker.com/_/php (see section "How to install more PHP extensions")

Also, what distro is used for the httpd (Apache) official image?

1
  • -1 downvote - why? The opinion might be that this might not be a valid question - but in any case the answer I give, provides the answer and suggests that a different question might be better to ask. I'd never downvote a question without giving a reason. In fact I've never downvoted a question, only provided constructive comments. Also credit me with giving my own answer (almost immediately after - benefit for all); I'm not a help vampire. Shame that the techie stereotype of limited communication skills is perpetuated by this negative score without reason. Thanks for your time reading though. Commented Oct 28, 2019 at 11:34

1 Answer 1

1

As I wrote this question I found a link to the original source code for these official images, which answered my questions:

For example, for official image php:7.2-fpm, the base image is: debian:stretch-slim

And for official Apache image, httpd it's debian:buster-slim

So, to find out the distro upon which official images are based on, go here: https://github.com/docker-library

...and append your official image of interest to the URL.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.