How to Install Docker and Compose on Ubuntu

Installing Docker on Ubuntu:

I summarized the steps in this article

sudo apt update
sudo apt install docker.io -y
sudo systemctl enable docker --now
docker --version

To put the current user into the 'docker' group so that you don't need to use 'sudo':

sudo usermod -aG docker $USER
newgrp docker

You may have to close and reopen your terminal for this to take effect.

Installing Docker Compose on Ubuntu

My summary is based off of this article.

mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version