{"id":64173,"date":"2026-03-16T18:51:22","date_gmt":"2026-03-16T15:51:22","guid":{"rendered":"https:\/\/cloudspinx.com\/?p=64173"},"modified":"2026-03-16T18:51:22","modified_gmt":"2026-03-16T15:51:22","slug":"install-and-use-docker-ce-on-oracle-linux","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-and-use-docker-ce-on-oracle-linux\/","title":{"rendered":"Install and Use\u00a0Docker\u00a0CE\u00a0on\u00a0Oracle Linux 9"},"content":{"rendered":"\n<p>Oracle Linux is an open-source RHEL-based system and a good alternative to CentOS and RHEL. Oracle Linux 9 is the latest version Oracle Linux series and the best alternative to CentOS 8 Linux that came to its end of life. Oracle supports a variety of services\/applications that any Linux system can like Webhosting and many more. In this article, we will be focusing on how to install and run Docker CE on Oracle Linux 9.&nbsp;<\/p>\n\n\n\n<p>Docker is an open-source operating system virtualization technology that allows one to run containerized software applications on Linux, Windows, and macOS. Docker exists in two different categories; Docker CE(Community Edition) is an open-source version of Docker that allows to run and deploy Docker containers freely at zero cost. On the other hand, Docker EE(Enterprise Edition) is an integrated, fully supported, and certified container platform that runs on RHEL, Oracle Linux, SUSE Linux Enterprise Server (SLES), AWS, Azure, Ubuntu, and Windows 2016.&nbsp;<\/p>\n\n\n\n<p>Alternatively, you can as well run containers on Oracle Linux 9 using Podman instead of Docker CE which is daemonless, rootless container engine founded by RedHat.<\/p>\n\n\n\n<p>Run the below command to rebuild the repo cache and update installed packages.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">&nbsp;Add Docker Repository to Oracle Linux 9<\/h3>\n\n\n\n<p>First, install the necessary utilities to enable you to add the docker repo to the system.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install -y yum-utils<\/code><\/pre>\n\n\n\n<p>Use the <strong>yum-config-manger<\/strong> tool to add docker repo in Oracle Linux 9.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"> sudo yum-config-manager --add-repo https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/mark>\nAdding repo from: https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/code><\/pre>\n\n\n\n<p>Confirm if the Docker repo has been added and exists in the repo list.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">sudo dnf repolist<\/mark>\nrepo id                                                                                  repo name\ndocker-ce-stable                                                                         Docker CE Stable - x86_64\nol9_UEKR7                                                                                Oracle Linux 9 UEK Release 7 (x86_64)\nol9_appstream                                                                            Oracle Linux 9 Application Stream Packages (x86_64)\nol9_baseos_latest                                                                        Oracle Linux 9 BaseOS Latest  (x86_64)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Docker CE Engine on Oracle Linux 9<\/h3>\n\n\n\n<p>Remove existing Docker Engine before proceeding with installation on Oracle Linux 9.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">sudo yum remove docker docker-* podman runc<\/mark>\n\nTransaction Summary\n===================================================================================================================================================================================================================\nRemove  18 Packages\n\nFreed space: 98 M\nIs this ok &#91;y\/N]: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">y<\/mark><\/code><\/pre>\n\n\n\n<p>Go ahead and execute the below command to install Docker Engine in Oracle Linux 9.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install docker-ce docker-ce-cli containerd.io<\/code><\/pre>\n\n\n\n<p>The screen below shows a number of dependencies to be installed. Accept the installation to continue.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Transaction Summary\n===================================================================================================================================================================================================================\nInstall  9 Packages\n\nTotal download size: 91 M\nInstalled size: 388 M\nIs this ok &#91;y\/N]: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">Y<\/mark><\/code><\/pre>\n\n\n\n<p>Accept the request to import the GPG&nbsp; key.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.....\nDocker CE Stable - x86_64                                                                                                                                                          5.4 kB\/s | 1.6 kB     00:00    \nImporting GPG key 0x621E9F35:\n Userid     : \"Docker Release (CE rpm) &lt;docker@docker.com&gt;\"\n Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35\n From       : https:\/\/download.docker.com\/linux\/centos\/gpg\nIs this ok &#91;y\/N]: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">Y<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Starting Docker on Oracle Linux 9<\/h3>\n\n\n\n<p>Now that installation is complete and successful, start the Docker service using the below command.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> sudo systemctl start docker<\/code><\/pre>\n\n\n\n<p>Enable Docker to make it start automatically when the system boots.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"> sudo systemctl enable docker<\/mark>\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/docker.service \u2192 \/usr\/lib\/systemd\/system\/docker.service.<\/code><\/pre>\n\n\n\n<p>Check status to confirm that the Docker service is up and running as expected.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status docker <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Run Docker Commands as Non-Root User.<\/h3>\n\n\n\n<p>By default, running any Docker command needs root privileges. Therefore, as a normal user, you will need <strong><em>sudo<\/em><\/strong> command to access docker else you will get a permission denied error. To allow access to the Docker by a normal user (without sudo), you will need to add a user to the <strong>docker group<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG docker $USER\nnewgrp docker<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Testing and Using Docker CE on Oracle Linux 9.&nbsp;<\/h3>\n\n\n\n<p>We are going to create our first <a href=\"https:\/\/computingforgeeks.com\/how-to-install-nginx-web-server-on-ubuntu\/\">Nginx web server<\/a> docker container to test and verify our installation. To achieve this, run the below command in the terminal to pull the Nginx image.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> $ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">docker pull nginx<\/mark>\nUsing default tag: latest\nlatest: Pulling from library\/nginx\n1efc276f4ff9: Pull complete \nbaf2da91597d: Pull complete \n05396a986fd3: Pull complete \n6a17c8e7063d: Pull complete \n27e0d286aeab: Pull complete \nb1349eea8fc5: Pull complete \nDigest: sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79\nStatus: Downloaded newer image for nginx:latest\ndocker.io\/library\/nginx:latest<\/code><\/pre>\n\n\n\n<p>Now use <strong>docker run<\/strong> command to deploy the Nginx container in Oracle Linux 9.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"> docker run --name webserver -d nginx<\/mark>\n27c78336b24db21bace8df21fa5d3941688d35e8ee0253f10ecf0e3c6f800c30<\/code><\/pre>\n\n\n\n<p>View and verify your deployed container.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">docker ps<\/mark>\nCONTAINER ID   IMAGE     COMMAND                  CREATED              STATUS              PORTS     NAMES\n27c78336b24d   nginx     \"\/docker-entrypoint.\u2026\"   About a minute ago   Up About a minute   80\/tcp    webserver<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Building and Use of Dockerfile.&nbsp;<\/h3>\n\n\n\n<p>Docker is a docker configuration file where you can write and declare variables in code format to deploy a container or even build a docker image. Am going to show you how you can create a simple docker file to build an Nginx image for yourself.&nbsp;<\/p>\n\n\n\n<p>Create your docker file and add the following lines of code.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> $ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">sudo vim vim dockerfile<\/mark>\nFROM oraclelinux:9\n\nLABEL maintainer=\"admin@cloudspinx.com\"\nRUN dnf update -y\nRUN dnf upgrade -y\nRUN dnf install epel-release -y\nRUN dnf install nginx -y\nEXPOSE 80\nCMD &#91;\"nginx\", \"-g\", \"daemon off;\"]<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>FROM<\/strong>: Represents the base of our image.&nbsp;<\/li>\n\n\n\n<li><strong>LABEL<\/strong>: Adding metadata to image<\/li>\n\n\n\n<li><strong>RUN<\/strong>: &nbsp; Execute the subsequent command on the line.&nbsp;<\/li>\n\n\n\n<li><strong>EXPOSE<\/strong>: Allow the container to listen to a specific port.&nbsp;<\/li>\n\n\n\n<li><strong>CMD<\/strong>:&nbsp; Default argument for ENTRYPOINT<\/li>\n<\/ul>\n\n\n\n<p>Run the below command to build your image by executing your dockerfile.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker build -t nginx-image:1.0.0 -f dockerfile \/home\/collins\/images\/<\/code><\/pre>\n\n\n\n<p>Use -f if you are not using the default dockerfile. Also, specify the location of your docker file of use .(dot) if you are working from the directory where your dockerfile is.&nbsp;<\/p>\n\n\n\n<p>The built process has been completed successfully. You can view your newly created image using the <strong>docker images<\/strong> command.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">docker images<\/mark>\nREPOSITORY    TAG       IMAGE ID       CREATED          SIZE\nnginx-image   1.0.0     3aa8e4275061   21 minutes ago   316MB<\/code><\/pre>\n\n\n\n<p>You can run a container using your images as shown below.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run --name webserver-2 -p 80:80 -d nginx-image:1.0.0<\/code><\/pre>\n\n\n\n<p>See running containers.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">docker ps<\/mark>\nCONTAINER ID   IMAGE               COMMAND                  CREATED             STATUS             PORTS                               NAMES\nf1ebf601ae71   nginx-image:1.0.0   \"nginx -g 'daemon of\u2026\"   5 seconds ago       Up 4 seconds       0.0.0.0:80-&gt;80\/tcp, :::80-&gt;80\/tcp   webserver-2\n27c78336b24d   nginx               \"\/docker-entrypoint.\u2026\"   About an hour ago   Up About an hour   80\/tcp                              webserver<\/code><\/pre>\n\n\n\n<p>Since we have forwarded to port 80 on the external network, we can access Nginx by visiting the IP address of your server in a browser.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"250\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-1024x250.png\" alt=\"\" class=\"has-border-color has-luminous-vivid-orange-border-color wp-image-64370\" style=\"border-width:3px;border-radius:3px\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-1024x250.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-300x73.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-768x187.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-1536x374.png 1536w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-1723x420.png 1723w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-696x170.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9-1068x260.png 1068w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2024\/10\/install-and-use-docker-ce-on-oracle-linux-9.png 1756w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>To restart containers use the <strong>docker restart <\/strong>command and specify the name of the container.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker restart webserver<\/code><\/pre>\n\n\n\n<p>To remove the container, use the<strong> docker rm<\/strong> command and ensure that the container is stopped.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker stop webserver\ndocker rm webserver<\/code><\/pre>\n\n\n\n<p>To remove the image as well use the <strong>docker rmi<\/strong> command and specify the name of the image you want to delete.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">docker rmi nginx<\/mark>\nUntagged: nginx:latest\nUntagged: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79\nDeleted: sha256:b692a91e4e1582db97076184dae0b2f4a7a86b68c4fe6f91affa50ae06369bf5\nDeleted: sha256:20fe57e949a4f70bf714590d9d5a78d158d12f4619d148619427a86dfc2e5a7a\nDeleted: sha256:042a89e2d80d230c47e0f2add6e13a5958cf18b039f04a3751200937ef76ba03\nDeleted: sha256:9e20f968300754f2d3ace5b726448b9a4249bb8196aded53b36ae8b6d3e8c174\nDeleted: sha256:15e9cede496de643a978a58c0b49ef7beea83b368dfefc2e46fa0e8dd589f099\nDeleted: sha256:d2850ddb0c4ca9f6289f624b27f987873e556c41250f5c5ed47a69c6c2529e4b\nDeleted: sha256:92a4e8a3140f7a04a0e5a15793adef2d0e8889ed306a8f95a6cfb67cecb5f212<\/code><\/pre>\n\n\n\n<p>We fully covered how you can install <a href=\"https:\/\/computingforgeeks.com\/install-and-use-docker-on-ubuntu-noble-numbat\/\">and use Docker<\/a> Engine on Oracle Linux 9 systematically in this guide. You can now deploy and run your containerized applications on Oracle Linux 9 and also use dockerfile to build your own Docker image. Thank you for your support and feel free to leave a comment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Explore More with CloudSpinx<\/h3>\n\n\n\n<p>Looking to streamline your tech stack? Look no further, here at CloudSpinx, we deliver robust solutions tailored to your needs.<\/p>\n\n\n\n<p><a href=\"https:\/\/computingforgeeks.com\/\">Learn more about how we can support your journey with CloudSpinx<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Linux is an open-source RHEL-based system and a good alternative to CentOS and RHEL. Oracle Linux 9 is the latest version Oracle Linux series and the best alternative to CentOS 8 Linux that came to its end of life. Oracle supports a variety of services\/applications that any Linux system can like Webhosting and many &#8230; <a title=\"Install and Use\u00a0Docker\u00a0CE\u00a0on\u00a0Oracle Linux 9\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-and-use-docker-ce-on-oracle-linux\/\" aria-label=\"Read more about Install and Use\u00a0Docker\u00a0CE\u00a0on\u00a0Oracle Linux 9\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":64369,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[316,27,299],"tags":[217,36172],"class_list":["post-64173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers","category-docker","category-how-to","tag-docker","tag-oracle-linux"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/64173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=64173"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/64173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/64369"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=64173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=64173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=64173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}