

Run the command below to see a version of docker installed. If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like: sudo usermod -aG docker $USER Sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin Install packages to allow apt to use a repository over HTTPS: sudo apt -y install lsb-release gnupg apt-transport-https ca-certificates curl software-properties-commonĪdd Docker’s official GPG key: curl -fsSL | sudo gpg -dearmor -o /etc/apt//docker.gpgĪdd stable repository: sudo add-apt-repository "deb $(lsb_release -cs) stable" Update the apt package index: sudo apt update The Docker CE package is now called docker-ce. Sudo apt remove docker docker-engine docker.io 2>/dev/null

If you have it installed, first uninstall it. Old versions of docker had the name docker or docker-engine.

Here we’ll cover installation of Docker CE on Ubuntu, Debian, Fedora, and CentOS and Arch Linux distributions.
