Answers: <p>As I wrote this question I found a link to the original source code for these official images, which answered my questions:</p>
  
  <p>For example, for official image <code>php:7.2-fpm</code>, the base image is: <a href="https://github.com/docker-library/php/blob/master/7.2/stretch/fpm/Dockerfile" rel="nofollow noreferrer">debian:stretch-slim</a> </p>
  
  <p>And for official Apache image, <code>httpd</code> it's <a href="https://github.com/docker-library/httpd/blob/master/2.4/Dockerfile" rel="nofollow noreferrer">debian:buster-slim</a></p>
  
  <p>So, to find out the distro upon which official images are based on, go here: <a href="https://github.com/docker-library" rel="nofollow noreferrer">https://github.com/docker-library</a></p>
  
  <p>...and append your official image of interest to the URL.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-10-21T20:24:12.387Z
Answers: 2019-10-21T20:24:12.387Z
Answers: therobyouknow
Body: <p>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.</p>
  
  <p>Indeed there are official images for such distros.</p>
  
  <p>But there are also official images for Apache (<a href="https://hub.docker.com/_/httpd" rel="nofollow noreferrer">httpd</a>) and PHP (<a href="https://hub.docker.com/_/php" rel="nofollow noreferrer">php</a>)</p>
  
  <p>My question is, how can I find out the default distro that these sit upon?</p>
  
  <p>I ask, because for example, I've seen a Dockerfile which starts with:</p>
  
  <p><code>FROM php:7.2-fpm</code> (which is one of the official PHP images)</p>
  
  <p>Followed by:</p>
  
  <pre><code>RUN apt-get update &amp;&amp; apt-get install -y \
          libfreetype6-dev \
          libjpeg62-turbo-dev \
          libpng-dev \
      &amp;&amp; docker-php-ext-install -j$(nproc) iconv \
      &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
      &amp;&amp; docker-php-ext-install -j$(nproc) gd
  </code></pre>
  
  <p>Source: <a href="https://hub.docker.com/_/php" rel="nofollow noreferrer">hub.docker.com/_/php</a> (see section "How to install more PHP extensions")</p>
  
  <p>Also, what distro is used for the httpd (Apache) official image?</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-10-28T11:34:19.600Z
Comments: -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.
Comments: therobyouknow
Tags: <docker><dockerfile>
Title: How to find the Linux distro used as the basis for an official docker image?
UserDisplayName: therobyouknow
ThreadText: # How to find the Linux distro used as the basis for an official docker image?
  
  (Asked by: username_0 on 2019-10-21)
  
  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](https://hub.docker.com/_/httpd)) and PHP ([php](https://hub.docker.com/_/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](https://hub.docker.com/_/php) (see section "How to install more PHP extensions")
  
  Also, what distro is used for the httpd (Apache) official image?
  
  **Tags:** docker, dockerfile
  
  > **Comments:**
  > **username_0**: -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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-10-21. Score: 1 | Accepted answer
  
  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](https://github.com/docker-library/php/blob/master/7.2/stretch/fpm/Dockerfile)
  
  And for official Apache image, `httpd` it's [debian:buster-slim](https://github.com/docker-library/httpd/blob/master/2.4/Dockerfile)
  
  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.
  
  
  ---
  
  