title: PHP latest Docker image exits with code 0
body: <p>Whenever I use <code>php:latest</code> Docker image, the container exits with a code 0 error, whereas, <code>php:7.4-fpm-alpine</code> image keeps the container running as expected. I didn't find a difference between the two <code>php:latest</code> and <code>php:7.4-fpm-alpine</code> images. I want to ensure that I always use the latest stable PHP version; I don't want to write a specific version number in the <code>docker-compose.yml</code> file.</p>
  <p>Here is the following <code>docker-compose.yml</code> file that I am using and shows the error:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3.9'
  
  services:
    nginx:
      image: nginx:latest
      container_name: nginx
      ports:
        - &quot;80:80&quot;
        - &quot;70:70&quot;
      volumes:
        - ./config/nginx/conf.d:/etc/nginx/conf.d/:delegated
        - ./www:/var/www/html:delegated
    php:
      image: php:latest
      container_name: php
      volumes:
        - ./www:/var/www/html:delegated
  </code></pre>
  <p>And here's the other one with PHP v7.4 FPM Alpine image that works just fine:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3.9'
  
  services:
    nginx:
      image: nginx:latest
      container_name: nginx
      ports:
        - &quot;80:80&quot;
        - &quot;70:70&quot;
      volumes:
        - ./config/nginx/conf.d:/etc/nginx/conf.d/:delegated
        - ./www:/var/www/html:delegated
    php:
      image: php:7.4-fpm-alpine
      container_name: php
      volumes:
        - ./www:/var/www/html:delegated
  </code></pre>
  <p>As you can see, both are identical <code>docker-compose.yml</code> files except for the PHP image change. Any idea what am I doing wrong? Why the <code>php:latest</code> docker image is exiting with a code 0 instead of running the container as <code>php:7.4-fpm-alpine</code> does?</p>