I'm setting up a new Ubuntu 22.04 server and need to install Docker. What's the recommended way to install it? Should I use the convenience script or the manual apt method?
Any tips for post-installation steps would also be appreciated.
Sign in to answer, or post anonymously below.
Use the official convenience script for the quickest setup:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Then add your user to the docker group to avoid using sudo:
sudo usermod -aG docker $USER
newgrp docker
Verify with docker --version and docker run hello-world.
For production servers, the manual apt method gives you more control over versions. Check our Docker Guide for the full walkthrough.