We can create a container and run it using Dockerfile. We can even run multiple container in separate ports using two Dockefiles in multiple terminals.

But when you want to create more than one container for your application, you have to create several Docker files. This adds on the load of maintaining them and is also quite time-consuming.

This blog is continuation with my previous blogwhere i showed** How to Install WordPress on Docker using MySQL Backend**

This problem is solved by **Docker Compose. **Docker compose is a tool which is used for multi-container applications in a single host.

For example in my previous blog I have to run two container : first wordpress container and second mysql container as backend.

We can run multi containers as services in the single host with the help of docker-compose.yaml.

Docker Swarm extends the concept of manage multiple containers deployed across multiple node docker cluster.

Installation

  1. Run this command to download the current stable release of Docker Compose in linux :
curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

#docker-compose #containers #docker #mysql #wordpress

Docker Compose: How to Install WordPress on Docker using MySQL Backend
4.10 GEEK