Docker installation on Ubuntu Uninstall old versions sudo apt-get remove docker docker-engine docker.io Update the apt package index: sudo apt-get update Install packages to allow apt to use a repository over HTTPS: sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common Add Docker’s official GPG key: curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - Verify Key Fingerprint sudo apt-key fingerprint 0EBFCD88 Add apt repository sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable" sudo apt-get update Install Docker CE sudo apt-get install docker-ce Verify docker installation sudo docker run hello-world Install Docker Compose sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose Make docker compose executable sudo chmod +x /usr/local/bin/docker-compose Test installation docker-compose --version