[Docker] Install Docker Compose in Linux

Docker Compose is the tools to build and deploy multiple containers. It used YAML to markup container’s settings and it is useful when deploy docker in host.

Even it can use yum to install docker-compose, but it is not latest version and it might have compatibilty problem when run yaml file. So it is suggest to install by own.

This example will list command of install docker compose.Execute commands as below:

# Define version.
dockerVersion=1.27.4

# Check with current linux distribution, get related docker-compose release.
sudo curl -L "https://github.com/docker/compose/releases/download/$dockerVersion/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# Change ownership to executable.
sudo chmod +x /usr/local/bin/docker-compose

# Set command completion which can call without specific path.
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

# Test result.
docker-compose --version

Reference

  1. Install Docker Compose, Docker,
    https://docs.docker.com/compose/install/
About C.H. Ling 262 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.