Install Docker on Ubuntu
Step 1: Update System
sudo apt -y update
Step 2: SET UP THE REPOSITORY
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20180409).
ca-certificates set to manually installed.
curl is already the newest version (7.58.0-2ubuntu3.8).
curl set to manually installed.
software-properties-common is already the newest version (0.96.24.32.12).
software-properties-common set to manually installed.
The following NEW packages will be installed:
apt-transport-https gnupg-agent
0 upgraded, 2 newly installed, 0 to remove and 18 not upgraded.
Need to get 6572 B of archives.
After this operation, 196 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.12 [1692 B]
Get:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 gnupg-agent all 2.2.4-1ubuntu1.2 [4880 B]
Fetched 6572 B in 0s (15.5 kB/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 56588 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.12_all.deb ...
Unpacking apt-transport-https (1.6.12) ...
Selecting previously unselected package gnupg-agent.
Preparing to unpack .../gnupg-agent_2.2.4-1ubuntu1.2_all.deb ...
Unpacking gnupg-agent (2.2.4-1ubuntu1.2) ...
Setting up apt-transport-https (1.6.12) ...
Setting up gnupg-agent (2.2.4-1ubuntu1.2) ...
Step 3:Import Docker repository GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Step 4:Add Docker CE repository to Ubuntu
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Get:1 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Get:2 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [11.0 kB]
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 75.5 kB in 1s (96.7 kB/s)
Reading package lists... Done
Step 5:Install Docker Engine
sudo apt-get install docker-ce docker-ce-cli containerd.ioStep
docker --version
Docker version 19.03.8, build afacb8b7f0
Comments
Post a Comment