# 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](https://docs.docker.com/engine/install/centos/) 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

```bash
sudo yum install -y yum-utils
```

Next, we add the Docker repository

```bash
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
```

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

```bash
sudo yum install docker-ce docker-ce-cli containerd.io
```

Lastly, start Docker

```bash
sudo systemctl start docker
```

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

```bash
sudo docker run hello-world
```

## Installing Docker Compose

First, download Docker Compose

```bash
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
```

Add execution perms to the download

```bash
sudo chmod +x /usr/local/bin/docker-compose
```

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

```bash
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```

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!
