# Install Docker Engine on RHEL 9.x

## Introduction

As the official Docker repository for RHEL 9.x has not been updated, So you will face issues while installing it.

  
In this article I will tell you how to install Docker in RHEL 9.x with an alternate method.

## Setting up Docker Repository

If you use the following commands from docker website link [https://docs.docker.com/engine/install/rhel/](https://docs.docker.com/engine/install/rhel/)

```bash
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/rhel/docker-ce.repo
```

You might get the following error while trying to set up the official RHEL Docker repository in RHEL 9.x

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1676525515592/c09520f2-ef82-47a3-a741-1c2a35ce2626.png align="center")

To fix the above error, try to setup CentOS docker repository in RHEL 9.x by following the commands

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

## Installing Docker

Use the following command to install Docker

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1676528324962/27a10632-b783-4354-b349-a014eb7e9356.png align="center")

This command installs the docker, but it does not start. So to start docker use the following command

```bash
sudo systemctl start docker
```

To verify Docker installation is successful try running hello-world image.

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

This command runs the container and prints the message and exits.

## Conclusion

By setting up CentOS Docker repository in RHEL 9.x you can install the Docker engine on RHEL 9.x.
