title: How to find out which Linux is installed inside docker image?
body: <p>I am new to docker and this is just a fascinating tool. However, I can't understand one thing about it. Simple Dockerfile usually begins with OS name and version, like:</p>
  <pre><code>FROM ubuntu:xenial
  ....
  </code></pre>
  <p>But which Linux OS will be used for Dockerfile like</p>
  <pre><code>FROM perl
  ....
  </code></pre>
  <p>or</p>
  <pre><code>FROM python:3.6
  ....
  </code></pre>
  <p>Of course I can find this out by running a container from this image and printing out the OS info, like:</p>
  <pre><code>docker run  -it  --rm  perl  bash
  # cat /etc/*-release
  </code></pre>
  <p>or</p>
  <pre><code>docker run  -it  --rm  python:3.6  bash
  # cat /etc/*-release
  </code></pre>
  <p>BTW, In both cases the OS is &quot;Debian GNU/Linux 10 (buster)&quot;.</p>
  <p>So, my questions are:</p>
  <ol>
  <li><p>How do I find out which OS will be run for a specific docker image without actually creating a docker container from it (the <code>docker inspect</code> command does not provide this info:  <code>docker inspect perl | grep -i Debian</code>)</p>
  </li>
  <li><p>How do I change the OS type for existing docker image. For example, I have an image that uses Ubuntu 14.04, and I want to change it to Ubuntu 18.04..</p>
  </li>
  </ol>
  <p>Thank you for your help:)</p>