In This Post We Are Going Learn How To Install Docker On Ubuntu 18.04
Docker Is An Open Source Virtualization Software.
Learn How To Launch EC2 Instance On AWS
1.Login to your Ubuntu machine and become root user
user@computer$ sudo bash
2.Remove older versions of docker
Older versions of Docker were called docker, docker.io, or docker-engine. If these are installed, uninstall them:
user@computer$ sudo apt-get remove docker docker-engine docker.io containerd runc
3. Set Up Repository.
user@computer$ apt-get update
user@computer$ apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
4. Add Docker’s official GPG key:
user@computer$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
5. Verify that you now have the key with the fingerprint
user@computer$ apt-key fingerprint 0EBFCD88
and output should be like below
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]
6. Use the following command to set up the stable repository.
user@computer$ add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
and output should be like below
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:6 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [12.5 kB]
Fetched 76.9 kB in 1s (141 kB/s)
Reading package lists... Done
7. Install Docker Engine
Update the apt package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:
user@computer$ apt-get update
user@computer$ apt-get install docker-ce docker-ce-cli containerd.io –y
and run below command to check docker version
user@computer$ docker --version
output should be like this.
Docker version 19.03.12, build 48a66213fe
We have successfully Installed Docker…