How to Install Docker on Rocky Linux 10

Docker is a container engine that uses the Linux Kernel to create the containers on top of an operating system. Which is used to create, deploy and run the applications.

First, check and install any pending system updates.

dnf update 

Adding Docker repository

Enable the Docker CE repository by running the following command.

dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Output:

[root@vps ~]# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo

Installing Docker-ce package

Install the Docker-ce package on Rocky Linux 9 by running the following command.

dnf -y  install docker-ce --nobest
dnf install docker-ce --allowerasing -y

Output:

[root@vps ~]# dnf -y  install docker-ce --nobest
Docker CE Stable - x86_64                       103 kB/s | 9.6 kB     00:00
Dependencies resolved.
================================================================================
 Package                    Arch    Version             Repository         Size
================================================================================
Installing:
 docker-ce                  x86_64  3:28.2.2-1.el10     docker-ce-stable   20 M
Installing dependencies:
 container-selinux          noarch  4:2.235.0-2.el10_0  appstream          55 k
 containerd.io              x86_64  1.7.27-3.1.el10     docker-ce-stable   44 M
 docker-ce-cli              x86_64  1:28.2.2-1.el10     docker-ce-stable  8.5 M
 fuse-common                x86_64  3.16.2-5.el10       baseos            8.7 k
 fuse-overlayfs             x86_64  1.14-2.el10         appstream          66 k
 fuse3                      x86_64  3.16.2-5.el10       baseos             58 k
 iptables-nft               x86_64  1.8.11-8.el10_0     appstream         189 k
 libslirp                   x86_64  4.7.0-10.el10       appstream          74 k
 slirp4netns                x86_64  1.3.2-1.el10        appstream          46 k
 tar                        x86_64  2:1.35-7.el10       baseos            865 k
Installing weak dependencies:
 docker-buildx-plugin       x86_64  0.24.0-1.el10       docker-ce-stable   16 M
 docker-ce-rootless-extras  x86_64  28.2.2-1.el10       docker-ce-stable  3.4 M
 docker-compose-plugin      x86_64  2.36.2-1.el10       docker-ce-stable   15 M

Transaction Summary
================================================================================
Install  14 Packages

Enable and Start the Docker service.

systemctl enable --now docker

systemctl start docker

Output:

[root@vps ~]# systemctl enable --now docker
Created symlink '/etc/systemd/system/multi-user.target.wants/docker.service' → '/usr/lib/systemd/system/docker.service'.

Check the Status of Docker Service

To verify the Docker service is running, use the following command,

systemctl status  docker

Output:

[root@vps ~]# systemctl status  docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: d>
     Active: active (running) since Mon 2025-06-16 03:37:12 UTC; 20s ago
 Invocation: 5b8439e5a9d640b88207603f5f9393d5
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 19622 (dockerd)
      Tasks: 10
     Memory: 23.4M (peak: 25M)
        CPU: 166ms
     CGroup: /system.slice/docker.service
             └─19622 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/con>

Jun 16 03:37:11 vps.server.com dockerd[19622]: time="2025-06-16T03:37:11.206108>
Jun 16 03:37:12 vps.server.com dockerd[19622]: time="2025-06-16T03:37:12.004993

DONE!


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS