How to install Docker on Oracle Linux 9.4
- 00:40 cat /etc/os-release
- 00:45 dnf update -y
- 01:08 dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
- 01:18 dnf install docker-ce -y
- 02:23 systemctl start docker
- 02:33 systemctl enable docker
- 02:50 systemctl status docker
- 03:03 docker info
- 03:34 docker run hello-world
- 03:51 docker images
To Install Docker On Oracle Linux 9.4
Introduction
Docker is a software platform that enables users to efficiently build, test, and deploy applications. It packages software into standardized units known as containers, which include all the necessary components for the software to operate, such as libraries, system tools, code, and runtime environments.
Procedure
Step 1: Check the OS version by following command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.4
Step 2: Run the following command to update your base system with the latest available packages.
[root@linuxhelp ~]# dnf update -y
Last metadata expiration check: 0:15:02 ago on Monday 12 August 2024 03:24:03 AM.
Dependencies resolved.
Nothing to do.
Complete!
Step 3: You can create it using the following command
[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
Step 4: Run the following command to install Docker CE on your server
[root@linuxhelp ~]# dnf install docker-ce -y
Docker CE Stable - x86_64 252 kB/s | 53 kB 00:00
Dependencies resolved.
====================================================================================================================================================================================================================
Package Architecture Version Repository Size
====================================================================================================================================================================================================================
Installing:
docker-ce x86_64 3:27.1.1-1.el9 docker-ce-stable 27 M
Installing dependencies:
containerd.io x86_64 1.7.19-3.1.el9 docker-ce-stable 43 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
====================================================================================================================================================================================================================
Preparing : 1/1
Installing : docker-compose-plugin-2.29.1-1.el9.x86_64 1/6
Running scriptlet: docker-compose-plugin-2.29.1-1.el9.x86_64 1/6
Installing : docker-buildx-plugin-0.16.1-1.el9.x86_64 2/6
Running scriptlet: docker-buildx-plugin-0.16.1-1.el9.x86_64 2/6
Installing : docker-ce-cli-1:27.1.1-1.el9.x86_64 3/6
Running scriptlet: docker-ce-cli-1:27.1.1-1.el9.x86_64 3/6
Installing : containerd.io-1.7.19-3.1.el9.x86_64 4/6
Running scriptlet: containerd.io-1.7.19-3.1.el9.x86_64 4/6
Installing : docker-ce-rootless-extras-27.1.1-1.el9.x86_64 5/6
Running scriptlet: docker-ce-rootless-extras-27.1.1-1.el9.x86_64 5/6
Installing : docker-ce-3:27.1.1-1.el9.x86_64 6/6
Running scriptlet: docker-ce-3:27.1.1-1.el9.x86_64 6/6
Verifying : containerd.io-1.7.19-3.1.el9.x86_64 1/6
Verifying : docker-buildx-plugin-0.16.1-1.el9.x86_64 2/6
Verifying : docker-ce-3:27.1.1-1.el9.x86_64 3/6
Verifying : docker-ce-cli-1:27.1.1-1.el9.x86_64 4/6
Verifying : docker-ce-rootless-extras-27.1.1-1.el9.x86_64 5/6
Verifying : docker-compose-plugin-2.29.1-1.el9.x86_64 6/6
Installed:
containerd.io-1.7.19-3.1.el9.x86_64 docker-buildx-plugin-0.16.1-1.el9.x86_64 docker-ce-3:27.1.1-1.el9.x86_64 docker-ce-cli-1:27.1.1-1.el9.x86_64 docker-ce-rootless-extras-27.1.1-1.el9.x86_64
docker-compose-plugin-2.29.1-1.el9.x86_64
Complete!
Step 5: Start the Docker service
[root@linuxhelp ~]# systemctl start docker
Step 6: Enable to start at system reboot
[root@linuxhelp ~]# systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
Step 7: verify the running status of the Docker service using the following command
[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 Mon 2024-08-12 03:50:10 IST; 24s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 8028 (dockerd)
Tasks: 9
Memory: 25.9M
CPU: 376ms
CGroup: /system.slice/docker.service
└─8028 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 12 03:50:08 linuxhelp dockerd[8028]: time="2024-08-12T03:50:08.206970787+05:30" level=info msg="Starting up"
Aug 12 03:50:08 linuxhelp dockerd[8028]: time="2024-08-12T03:50:08.289853062+05:30" level=info msg="Loading containers: start."
Aug 12 03:50:08 linuxhelp dockerd[8028]: time="2024-08-12T03:50:08.364455853+05:30" level=info msg="Firewalld: created docker-forwarding policy"
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.451964599+05:30" level=info msg="Firewalld: interface docker0 already part of docker zone, returning"
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.882129418+05:30" level=info msg="Loading containers: done."
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.917927291+05:30" level=warning msg="Not using native diff for overlay2, this may cause degraded performance for building images: kernel has CONF>
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.918069153+05:30" level=info msg="Docker daemon" commit=cc13f95 containerd-snapshotter=false storage-driver=overlay2 version=27.1.1
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.918512265+05:30" level=info msg="Daemon has completed initialization"
Aug 12 03:50:10 linuxhelp dockerd[8028]: time="2024-08-12T03:50:10.980897475+05:30" level=info msg="API listen on /run/docker.sock"
Aug 12 03:50:10 linuxhelp systemd[1]: Started Docker Application Container Engine.
Step 8: Verify the Docker version with additional information using the following command
[root@linuxhelp ~]# docker info
Client: Docker Engine - Community
Version: 27.1.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.16.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 27.1.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-208.159.3.2.el9uek.x86_64
Operating System: Oracle Linux Server 9.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 2.458GiB
Name: linuxhelp
ID: 655deb82-0fbe-45b0-9a14-a1c09670f7d1
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Step 9: Run Docker’s hello-world container to test Docker.
[root@linuxhelp ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:1408fec50309afee38f3535383f5b09419e6dc0925bc69891e79d84cc4cdcec6
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Step 10: To verify the downloaded image
[root@linuxhelp ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest d2c94e258dcb 15 months ago 13.3kB
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to install Docker on Oracle Linux. Your feedback is much welcome.
Comments ( 0 )
No comments available