Install Docker Compose on Centos 7
Install Docker Compose on Centos 7
Docker compose a tool which is used to run multi container applications. In a docker compose we will define all the docker images and containers details in single YML file called docker-compose.yml. Using this docker-compose.yml file we will create multiple containers. In the following steps i will show you how to install docker compose on centos 7.
Download The Docker Compose Binary
Download the docker compose binary by using below command.
sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
Here i installed docker compose 1.21.0 version on centos 7. If you want to install different version of docker compose on centos 7, go to https://github.com/docker/compose/releases. Choose the docker compose version and in the above command replace 1.21.0 with your docker compose version.
above command will download the docker compose binary to /usr/local/bin/.
Give Executable Permissions to Docker compose binary
Give the executable permissions to downloaded docker compose binary using below command.
sudo chmod +x /usr/local/bin/docker-compose
Create a Symbolic link to Execute Docker Compose:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
/usr/bin/ is the primary directory for executable programs. So that is why we are creating symbolic link to docker compose executable binary.
Verify Docker Compose Version:
verify docker compose version with docker-compose - -version command
[root@ip-10-0-0-20 ~]# docker-compose --version docker-compose version 1.21.0, build 5920eb0 [root@ip-10-0-0-20 ~]#
- install docker compose on centos 7
- docker compose install on centos 7
- docker compose install
- install docker compose on centos 7