Простой пример, создаем docker-compose.yml с содержимым:
version: '3.1'
services:
ubuntu:
image: ubuntu
postgres:
image: postgres:9.6
php-fpm:
image: otezvikentiy/php7.2-fpm:0.0.11
web:
image: "debian:stretch-slim"
Выполняем:
docker-compose up -d
Starting docker_d_php-fpm_1 ... done
Starting docker_d_ubuntu_1 ... done
Starting docker_d_postgres_1 ... done
Starting docker_d_web_1 ... done
Затем:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d3d6dfbafbd0 otezvikentiy/php7.2-fpm:0.0.11 "docker-php-entryp..." 4 minutes ago Up 2 minutes 22/tcp, 9000/tcp docker_d_php-fpm_1
3271a44ede0f postgres:9.6 "docker-entrypoint..." 6 minutes ago Up 2 minutes 5432/tcp docker_d_postgres_1
Postgres и php-fpm успешно работают в фоновом режиме, а ubuntu и debian - нет.
Почему?