DEV Community

Cover image for Install Docker (Compose) on Oracle Linux 8
Kyle Schwartz
Kyle Schwartz

Posted on

15

Install Docker (Compose) on Oracle Linux 8

Welcome! I couldn't find a simple, straightforward tutorial on how to do this. Everything written here is a summation of the Docker documentation on CentOS, as that is what OL is built upon. I will be using Oracle Linux 8 build 2020.12.17-0, for reference. Now, on to the tutorial!

Installing Docker Engine

First, install yum-utils

sudo yum install -y yum-utils
Enter fullscreen mode Exit fullscreen mode

Next, we add the Docker repository

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
Enter fullscreen mode Exit fullscreen mode

Now, we can install Docker. Answer y for all prompts.

sudo yum install docker-ce docker-ce-cli containerd.io
Enter fullscreen mode Exit fullscreen mode

Lastly, start Docker

sudo systemctl start docker
Enter fullscreen mode Exit fullscreen mode

Optionally, run the hello-world image to make sure everything works

sudo docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Installing Docker Compose

First, download Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Add execution perms to the download

sudo chmod +x /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Lastly, we need to link to the docker-compose command

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Now, everything should work. Run docker-compose --version to confirm.


And that's it! Easy, right?

Thank you for joining me on this adventure and I hope this was some help!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay