Below blog entry will give details about installating Docker Community edition on Ubuntu v16.04
URL References from Docker documentation
To install Docker CE, you need the 64-bit version of one of these Ubuntu versions. Docker CE is supported on x86_64 (or amd64), armhf, arm64, s390x (IBM Z), and ppc64le (IBM Power) architectures.
Cosmic 18.10 / Bionic 18.04 (LTS) / Xenial 16.04 (LTS)
I will be performing Installation using the Repository process so that we get the package downloaded from the repository and then proceed with installation on my system. I am on root user and we can run the commands using a normal user who can sudo to root. Perform post installation activities to activate a user who is present in Docker group.
Step 1: Setup the repository
Uninstall any of the Older versions of Docker (incase any) using below command,
- apt-get remove docker docker-engine docker.io containerd runc
Update the apt package index on Ubuntu
- apt-get update
Install packages to allow apt to use a repository over HTTPS using below command
apt-get install \
Add Docker’s official GPG key
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
- apt-key fingerprint 0EBFCD88
Use the following command to set up the stable repository.
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
Step 2: Install Docker CE
Update the apt package index
- apt-get update
Install the latest version of Docker CE and containerd
- apt-get install docker-ce docker-ce-cli containerd.io
Verify that Docker CE is installed correctly by running the hello-world image
- docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
Optional Step: To install specific version of Docker on Ubuntu OS,
List the versions available in your repo using below command,
- apt-cache madison docker-ce
Install a specific version using the version string from the second column
- apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
Post Installation activities can be performed on Ubuntu OS. Click below URL for reference.