Easiest way to Install Docker on Oracle Linux 8

Some of my most popular articales on this blog are around Docker on Oracle Linux (this and this) but I realised today as my creative writing juices were flowing that I had never actaully written any article to detil how to Install Docker on Oracle Linux.

In this article I will show how to install Docker on Oracle Linux in this case specifically Oracle Linux 8.

Install Docker on Oracle Linux 8
Install Docker on Oracle Linux 8

For this working example I am assuming you have ssh access to your Oracle Linux server as well as root access to be able to install Docker on Oracle Linux 8. Additionally for my example I am using an Oracle Linux Vagrant image. If you haven’t heard about Oracle Linux Vagrant images you can read about them on the Oracle Blog here and specifically about Vagrant here.

Install Docker on Oracle Linux

First things first we need to enable the required Docker repositories on our server.

dnf install -y dnf-utils zip unzip

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

With the Docker repo added we can install Docker on our Oracle Linux Server.

dnf install -y docker-ce --nobest

Depending on your Oracle Linux server the install can take 5-10 minutes.

Lastly we can finsih the install be adding docker to systemctl by running the following commands to add then start Docker on Oracle Linux.

systemctl enable docker.service

systemctl start docker.service

We can now see docker running on this Oracle Linux 8 Server.

[root@localhost ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-12-28 13:37:29 UTC; 50s ago
Docs: https://docs.docker.com
Main PID: 55190 (dockerd)
Tasks: 8
Memory: 31.1M
CGroup: /system.slice/docker.service
└─55190 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

[root@localhost ~]# docker info
Context: default
Debug Mode: false
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
scan: Docker Scan (Docker Inc., v0.23.0)

[root@localhost ~]# docker version
Client: Docker Engine - Community
Version: 20.10.22
API version: 1.41
Go version: go1.18.9
Git commit: 3a2c30b
Built: Thu Dec 15 22:28:05 2022
OS/Arch: linux/amd64
Context: default
Experimental: true

Thats all there is to it, its a pretty easy straight forward process that should cause most any trouble. If you do have issues please leave a comment below and I will try my best to assist.





Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.