- Uninstall old version
sudo apt-get remove docker docker-engine docker.io containerd runc
- Set up the repo
sudo apt-get update
then
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- Add docker PGP key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Setup stable repo
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
- Now install
sudo apt-get update
then
sudo apt-get install docker-ce docker-ce-cli containerd.io
- Verify by
sudo docker run hello-world
Ref: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Little tuto: https://hub.docker.com/?overlay=onboarding