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:
sudo apt updatesudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-commonNext, import the repository’s GPG key using the following curl command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -And add the Docker APT repository to your system:
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:
sudo apt updatesudo apt install docker-ce docker-ce-cli containerd.io gitOnce the installation is completed, the Docker service will start automatically. You can verify it by typing:
sudo systemctl status dockerInstall Docker Compose
Run this command to download the current stable release of Docker Compose:
sudo apt-get install docker-compose-pluginAfter this, you should be ready to run docker compose up and have your project ready to go.
Until next time, peace.