How to Install docker compose

Switching the gear a little bit here to get ready to install Artifactory on Docker.

Docker compose is a mechanism to start Docker containers with the predefined parameters. It’s kind of like bash script file that executes another executable with parameters but it’s in yaml format. Let’s see how we can install it on Oracle Linux 7.7 which I’m using as my main distribution now. Oracle Linux is very similar to CentOS with more security enhancements.

I’m going to assume that you have already installed Docker. Docker installation instruction is in this blog entry.

Docker Compose Installation

  1. Open terminal and ssh into the machine where you have Docker installed.
  2. As of October of 2019, the latest version is 1.24.1. You can find out the docker compose releases here.
  3. Execute the following command to install it.
sudo curl -L`uname -s`-`uname -m` -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose

Once it’s done, check if docker-compose works on your machine by executing the following command.

$ docker-compose -v

It should show the version of docker-compose you just installed.

docker-compose version 1.24.1, build 4667896b

I will cover how to create a docker-compose file in the next blog entry while I get Artifactory to work on Docker.

Leave a Reply

Your email address will not be published.