How to Install Docker in Ubuntu 21.04 Using Official Repository | Part - 3 Method - 1

Опубликовано: 08 Май 2026
на канале: Learn Computer Technologies
1,635
18

You can install Docker Engine in different ways. Here we will learn the four methods of installation of Docker in Ubuntu 21.04
Method – 1: Installation of Docker Using Official Repository. This is the recommended approach.
Method – 2: Installation of Docker Using Ubuntu OS Default Repositories apt.
Method – 3: Installation of Docker Using a .deb Package from Docker Official Website This method is the recommended when no internet available.
Method – 4: Installation of Docker Using Convenience Script.

commands used in this video for your reference. You can copy from here.
$ sudo apt-get update
$ sudo install apt-transport-https ca-certificates curl gnupg lsb-release
$ curl -fsSL https://download.docker.com/linux/ubu... | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list Replace this text as Angle Bracket in video /dev/null

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ sudo groupadd docker
$ sudo usermod -aG docker ${USER}

$ docker ps
$ docker pull pihole/pihole
$ docker container run -d -i -t -p 80:80 --rm pihole/pihole
$ docker container stop [Paste your container ID here.]

Part 3 Method - 1 - Link:    • How to Install Docker in Ubuntu 21.04 Usin...  
Part 3 Method - 2 - Link:    • How to Install Docker in Ubuntu 21.04 Usin...  
Part 3 Method - 3 - Link:    • How to Install Docker in Ubuntu 21.04 Usin...  

#Docker #Dockerinstallation #containers #virtualization