I previously wrote an article on how to install Docker on CentOS 7. I’m going to write up an article for Oracle Linux 7.7 this time. It’s the same Docker after all, so the end result should be pretty much the same.
First of all, SSH into your VM on OCI.
$ ssh opc@[the public IP address]
Update the host.
$ sudo yum -y update
Install Docker.
sudo yum install -y docker-engine
Start Docker.
$ sudo systemctl start docker
Configure Docker to survive restarts.
$ sudo systemctl enable docker
Run hello-world container to test the Docker engine.
$ sudo docker run hello-world
Check the running (but exited) container.
$ sudo docker ps -a
Remove the container.
$ sudo docker rm [container ID]
List the local images.
$ sudo docker images
Remove the local image.
$ sudo docker rmi [image ID]
Recap
Wow, that was a breeze. I could have added Docker’s yum repository to install the latest and greatest bits but then I’d rather go with Oracle’s repo because the version must have gone through tests for Oracle Linux. This looks promising and I’m one step closer to hosting my WordPress blog on OCI.