Introduction to Docker Compose

Introduction to docker compose

source: docker

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see the list of features.

Compose works in all environments: production, staging, development, testing, as well as CI workflows. You can learn more about each case in Common Use Cases.

Using Compose is basically a three-step process:

  • Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
  • Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
  • Run docker-compose up and Compose starts and runs your entire app. source :

Install compose

Set permission executable

Check docker-compose version

Compose and Wordpress

create directory my_wordpress and enter the directory

create docker-compose.yml file

run compose

View container

Access Wordpress from browser

Access wordpress on web browser

This is my little notes based my experiment and my learning. Keep learning and keep calm.