Install Docker

I’ve watched a lot of YouTube creators and read a lot of articles on how to install Docker on Ubuntu and almost always they go through the history and what containers are and the benefits of using containers. I also see them install docker-compose. Totally not needed, compose has been built in as a module for some time now. If I’m looking for a tutorial on how to install Docker, I already know what containers are and the benefits of using them. I just want to install Docker. So, I’m going to skip all that and get straight to the point using a minimal Ubuntu server build.

Install Docker

Login as the user you want to run Docker as or create a new user just for Docker, then run the following commands:

sudo apt update && sudo apt upgrade -y
curl -s https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
docker ps
docker compose ls

That’s it. If you’re used to using docker-compose then remove the - and just use:
docker compose ...
You’re all set.