docker-compose

Docker Compose

Concept Docker Compose enable us to manage multi container environments in a file. Install As of Dec.2021 On Ubuntu 20.04 V2 https://docs.docker.com/compose/cli-command/#install-on-linux $ mkdir -p ~/.docker/cli-plugins/ $ curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose $ chmod +x ~/.docker/cli-plugins/docker-compose $ docker compose version Docker Compose version v2.0.1 Sample: php-fpm with Nginx Directory structure $ tree . ├── README.md ├── docker-compose.yml ├── front-php │ └── Dockerfile └── nginx_conf └── front.conf docker-compose.yml: version: "3" services: front-nginx: image: nginx:latest container_name: front-nginx ports: - "80:80" volumes: - {{ path_to_php-fpm_app }}/myconf.