How to install docker-compose in Ubuntu Server

One of the most widely used Linux Distro is Ubuntu because of its apt-get and the community who is actively supporting it. To install docker-compose you will need to logon to your server and type the following commands in your terminal.

sudo apt-get update
wget -O- | sudo sh

Once docker is installed, you will have the option to add a user to the docker group, but note that doing so will give them the chance to get a root priviledge to your docker host. To add a user in the docker group, you can type the following command.

sudo usermod -aG docker your-user

You can install docker-compose with several option:

sudo curl -L`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo apt-get install -y python-pip
sudo pip install docker-compose
#As of this writing docker-compose version 1.21.2, build a133471
sudo apt-get install -y docker-compose

It’s up to you which one you prefer, but for me, I am using option 2 which is via PIP.

Leave a Reply

Your email address will not be published. Required fields are marked *