Installing Docker By Setting Up Repositories In Linux Distros

Alex Duncan
Geek Culture
Published in
3 min readOct 21, 2021

--

Before starting the installation of Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Later on, you can install and update Docker from the repository.

Install on CentOS

Set up the repository and Install Docker engine.
Install the
yum-utils package (which provides the yum-config-manager utility) and set up the stable repository.

sudo yum install -y yum-utils

sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-nightly
sudo yum-config-manager --enable docker-ce-test
sudo yum-config-manager --disable docker-ce-nightly
sudo yum install docker-ce docker-ce-cli containerd.ioInstallation Of Specific version of Docker Engine:sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.iosudo systemctl start dockersudo docker run hello-world

Install on Debian:

Set up the repository and Install Docker engine.

OS requirements:

  • Debian Bullseye 11 (stable)
  • Debian Buster 10 (oldstable)
  • Raspbian Bullseye 11 (stable)
  • Raspbian Buster 10 (oldstable)

--

--

Alex Duncan
Geek Culture

Human, AWS/DevOps Expert, Writer, Reader, Researcher, Traveler