How to Quickly Install Docker Compose on Ubuntu 20.04

Sign up for BitLaunch and install Docker Compose to aid your development.

Docker has shot to popularity in recent years for its ability to deliver OS-level virtualization for software by holding processes in separate 'containers'. The lack of full hardware emulation makes it lighter than a traditional VM, so much so that software engineers can host over five times the instances, with portability to boot. If you’re reading this, you probably have an idea of what you need it for already, so we will instead show you how to install Docker Compose on Ubuntu 20.04.

First, though some pre-requisites. You’ll need the following:

  • An Ubuntu 20.04 to install Docker on, either local or on a VPS
  • Your VPS credentials, which can be found in your hosts’ control panel
  • A method to connect to the VPS, such as PuTTY
  • Sudo user access on the machine
Elasticsearch Reference [7.9] | Elastic

Now we can install Docker Compose via the command line. For the unfamiliar, Compose lets you configure all of your application’s service via a YAML file and run them with a single command. To grab it and install it type:

sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

We now need to change some permissions around so that we can execute the docker-compose install command. We’ll use chmod for this as is standard:

sudo chmod +x /usr/local/bin/docker-compose

Issues can occasionally happen during install without an error being thrown up. We can make sure everything went smoothly by running the Docker Compose version check command:

docker-compose --version

If you’ve done every correctly, the command-line will spit out your version and build number, which should look something like this:

docker-compose version 1.26.0, build d4451659

You can now move into any other configuration that is required, including setting up .yml files.