Installing docker-compose in Ubuntu 16.04/ 18.04
If you are looking for Docker installation or not done the Docker installation yet, please refer this post to install Docker first https://onecompiler.com/posts/3v75qv9pk/installing-docker-in-ubuntu-16-04-18-04
docker-compose
is not installed along with docker. You need to run the following series of commands to install docker-compose.
1. Download Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2. Add execute permissions to the docker-compose file
sudo chmod +x /usr/local/bin/docker-compose
With these commands, you should have docker-compose in your system. You can verify using the following commands
Verifying Docker Installation
docker-compose -v
On successful installation you should see the version like following.
$ docker-compose -v
docker-compose version 1.24.1, build 4667896b