Install Docker on Oracle Linux 9 using docker repository
Docker install OL9
To install Docker on Oracle Linux 9, follow these steps:
- Update your system packages:
sudo yum update -y
- Add Docker’s official repository to your system’s yum sources list:
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- Install Docker Engine, CLI, and containerd:
sudo yum install docker-ce docker-ce-cli containerd.io
- Enable and start the Docker service:
sudo systemctl enable docker
sudo systemctl start docker
- Verify that Docker is up and running by running a test image:
sudo docker run hello-world
You should see :
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c9c5fd25a1bd: Pull complete
Digest: sha256:dd01f97f252193ae3210da231b1dca0cffab4aadb3566692d6730bf93f123a48
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.
(arm64v8)
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/
To allow a non-root user to manage Docker, you can add the user to the docker group:
sudo usermod -aG docker <username>
Log out and log back in for the group membership to take effect.