• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How To Install Docker in Rocky Linux 9.4

  • 00:46 cat /etc/os-release
  • 00:56 rpm -qa docker
  • 01:00 dnf check-update
  • 01:13 dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  • 01:24 dnf install docker-ce docker-ce-cli containerd.io
  • 02:16 systemctl start docker
  • 02:32 systemctl enable docker
  • 02:44 systemctl status docker
  • 02:56 docker container create -i -t --name mycontainer alpine
  • 03:31 docker images
7901

To Install Docker In Rocky Linux 9.4

Introduction

Docker has emerged as an essential tool for both development and operations teams, offering a platform to efficiently build, share, and run containerized applications. For professionals utilizing Rocky Linux 9.4, the installation of Docker can greatly enhance development and deployment workflows. This article will provide a comprehensive guide to the steps required for installing and utilizing Docker on Rocky Linux 9.4.

Procedure

Step1: Check the OS version in terminal by using following commands

[root@linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.4 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"

Step2: Check the package is installed or not in terminal

[root@linuxhelp ~]# rpm -q docker
package docker is not installed

Step3: Update the Linux server by using following commands

[root@linuxhelp ~]# dnf check-update
Last metadata expiration check: 0:05:54 ago on Wed 07 Aug 2024 03:00:55 PM EDT.
NetworkManager.x86_64                            1:1.46.0-13.el9_4                 baseos   
NetworkManager-adsl.x86_64                       1:1.46.0-13.el9_4                 baseos   
NetworkManager-bluetooth.x86_64                  1:1.46.0-13.el9_4                 baseos   
NetworkManager-config-server.noarch              1:1.46.0-13.el9_4                 baseos   
NetworkManager-libnm.x86_64                      1:1.46.0-13.el9_4                 baseos   
NetworkManager-team.x86_64                       1:1.46.0-13.el9_4                 baseos   
NetworkManager-tui.x86_64                        1:1.46.0-13.el9_4                 baseos   
NetworkManager-wifi.x86_64                       1:1.46.0-13.el9_4                 baseos  

Step4: Add the official Docker repository.

[root@linuxhelp ~]# 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

Step5: Install Docker, which is composed of three packages by using following commands

[root@linuxhelp ~]# dnf install docker-ce docker-ce-cli containerd.io
Docker CE Stable - x86_64                                                                                                     226 kB/s |  53 kB     00:00    
Dependencies resolved.
==============================================================================================================================================================
 Package                                        Architecture                Version                               Repository                             Size
==============================================================================================================================================================
Installing:
 containerd.io                                  x86_64                      1.7.19-3.1.el9                        docker-ce-stable                       43 M
 docker-ce                                      x86_64                      3:27.1.1-1.el9                        docker-ce-stable                       27 M
 docker-ce-cli                                  x86_64                      1:27.1.1-1.el9                        docker-ce-stable                      7.8 M
Installing weak dependencies:
 docker-buildx-plugin                           x86_64                      0.16.1-1.el9                          docker-ce-stable                       14 M
 docker-ce-rootless-extras                      x86_64                      27.1.1-1.el9                          docker-ce-stable                      4.0 M
 docker-compose-plugin                          x86_64                      2.29.1-1.el9                          docker-ce-stable                       13 M

Transaction Summary
==============================================================================================================================================================
Install  6 Packages

Total download size: 109 M
Installed size: 422 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): docker-buildx-plugin-0.16.1-1.el9.x86_64.rpm                                                                            17 MB/s |  14 MB     00:00    
(2/6): docker-ce-27.1.1-1.el9.x86_64.rpm                                                                                       20 MB/s |  27 MB     00:01    
(3/6): containerd.io-1.7.19-3.1.el9.x86_64.rpm                                                                                 25 MB/s |  43 MB     00:01    
(4/6): docker-ce-cli-27.1.1-1.el9.x86_64.rpm                                                                                  7.5 MB/s | 7.8 MB     00:01    
(5/6): docker-ce-rootless-extras-27.1.1-1.el9.x86_64.rpm                                                                      7.1 MB/s | 4.0 MB     00:00    
(6/6): docker-compose-plugin-2.29.1-1.el9.x86_64.rpm                                                                           28 MB/s |  13 MB     00:00    
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                          48 MB/s | 109 MB     00:02     
Docker CE Stable - x86_64                                                                                                      23 kB/s | 1.6 kB     00:00    
Importing GPG key 0x621E9F35:

Step6: Start the Docker daemon process.

[root@linuxhelp ~]# systemctl start docker

Step7: Enable the Docker daemon:

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

Step8: Check the status in Docker Daemon by using following commands

[root@linuxhelp ~]# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: disabled)
     Active: active (running) since Wed 2024-08-07 15:08:35 EDT; 22s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 8741 (dockerd)
      Tasks: 9
     Memory: 26.4M
        CPU: 314ms
     CGroup: /system.slice/docker.service
             └─8741 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Aug 07 15:08:31 linuxhelp systemd[1]: Starting Docker Application Container Engine...
Aug 07 15:08:31 linuxhelp dockerd[8741]: time="2024-08-07T15:08:31.726331641-04:00" level=info msg="Starting up"
Aug 07 15:08:31 linuxhelp dockerd[8741]: time="2024-08-07T15:08:31.814915507-04:00" level=info msg="Loading containers: start."
Aug 07 15:08:32 linuxhelp dockerd[8741]: time="2024-08-07T15:08:32.386490390-04:00" level=info msg="Firewalld: created docker-forwarding policy"

Step9: Create the image in container using docker command

root@linuxhelp ~]# docker container create -i -t --name mycontainer alpine
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
c6a83fedfae6: Pull complete
Digest: sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
Status: Downloaded newer image for alpine:latest
16ff2fec83e1deb9bedf3694c9de166db213822197dac4dfe866544a1432f5f0

Step10: List out the images by using following commands

[root@linuxhelp ~]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
alpine       latest    324bc02ae123   2 weeks ago   7.8MB
[root@linuxhelp ~]#

Conclusion:

There’s a whole lot more to Docker than has been given in this article, but this should be enough to getting you started working with it on Rocky Linux 9. Like most open source projects, Docker is built from a fast-developing codebase.

Tags:
matthew
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to check Docker installation in Linux?

A

To check if you have Docker installed run command “docker ps” on the terminal screen. to verify it is installed and running.

Q

Why we are using Rocky Linux for our Linux distribution?

A

Rocky Linux is a downstream distribution based on the Red Hat Enterprise Linux (RHEL) source code, its binary-compatible with RHEL and intended the to be an alternative to its linux predecessor Centos.

Q

How to check Docker version?

A

You can check the version of Docker “docker --version.”

Q

What are the advantages of Docker?

A

One of the most important advantages of Docker containers is that it's easy to deploy them quickly.

Q

How to delete empty images in Docker?

A

If we do not want to find dangling images and remove them one by one, we can use the “docker image prune”

Related Tutorials in How To Install Docker in Rocky Linux 9.4

Related Tutorials in How To Install Docker in Rocky Linux 9.4

How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
Oct 17, 2022
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to Install and Configure Mega in Linux
How to Install and Configure Mega in Linux
Jul 19, 2016
How to use Aureport command on Linux
How to use Aureport command on Linux
Nov 28, 2017
How to install Development tools on Linux
How to install Development tools on Linux
Jun 12, 2018
How to Install mod_ssl and SSL certificate on Oracle Linux
How to Install mod_ssl and SSL certificate on Oracle Linux
Dec 30, 2021
How to install Nextcloud on Ubuntu 22.04 version
How to install Nextcloud on Ubuntu 22.04 version
Jun 23, 2023
How to install ClipGrab in Linux
How to install ClipGrab in Linux
Jul 16, 2016

Related Forums in How To Install Docker in Rocky Linux 9.4

Related Forums in How To Install Docker in Rocky Linux 9.4

Linux
jayce class=
shasum command not found
May 5, 2017
Linux
stephan class=
How to list all samba users
Jan 12, 2018
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Linux
baseer class=
single command to apply setfacl for multiple user at a time
Jan 23, 2018
Linux
beulah class=
What does mean by 0 0 value in fstab file
Jan 2, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018

Related News in How To Install Docker in Rocky Linux 9.4

Related News in How To Install Docker in Rocky Linux 9.4

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Microsoft makes its Azure App service now available on Linux Systems
Microsoft makes its Azure App service now available on Linux Systems
Sep 7, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaiah ?
What is the use of SUID & SGID commands

How to set the special permissions to the files and folders using SUID and SGID commands...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.