Tux, the Linux mascot, hitting the Docker whale mascot with a wrench

A Simple Docker Compose Install for Ubuntu


One of the most annoying things about a new VPS setup is trying to get your Docker Compose scripts to run nicely on the base Ubuntu installation. Here’s some quick instructions for the most painless way to get this install finished


Install Docker

First, get everything up to date and install these necessary tools:

Terminal window
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Next, import the repository’s GPG key using the following curl command:

Terminal window
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

And add the Docker APT repository to your system:

Terminal window
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Finally, to install the latest version of Docker, run the commands below:

Terminal window
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io git

Once the installation is completed, the Docker service will start automatically. You can verify it by typing:

Terminal window
sudo systemctl status docker


Install Docker Compose

Run this command to download the current stable release of Docker Compose:

Terminal window
sudo apt-get install docker-compose-plugin

After this, you should be ready to run docker compose up and have your project ready to go.


Until next time, peace.