DEV Community

Yaroslav Shelomentsev
Yaroslav Shelomentsev

Posted on

Install Docker on Centos 9

Remove conflict packages with Docker first

dnf -y remove podman runc
Enter fullscreen mode Exit fullscreen mode

install repo

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/docker-ce.repo
dnf --enablerepo=docker-ce-stable -y install docker-ce
Enter fullscreen mode Exit fullscreen mode

Autoload docker

systemctl enable --now docker
Enter fullscreen mode Exit fullscreen mode

Check it

rpm -q docker-ce
docker version
Enter fullscreen mode Exit fullscreen mode

Top comments (0)