How to install Docker on a Red Hat Enterprise Linux Server



Podman vs Docker Overview

In RedHat 8 and up, support for Docker was stopped. Instead, RedHat supports and includes with its default images an Open Source tool created by RedHat engineers named Podman. Both Docker and Podman can be used to run the vFunction Server on a RedHat Server. The following paragraphs go into more details about the pros and cons of each product and provide steps for installing Docker if that is the product that makes the most sense for an organization.

Podman is supported by vFunction and can be used to run the vFunction Server’s Containers. In the experience of the vFunction Customer Success team, a Podman-based installation tends to be higher-touch in the installation process and the maintenance of the system. This is because the Podman prerequisites require more intervention from a root / sudo user to configure the system. And, because the Podman Containers will not automatically be restarted after a reboot.

Because Podman is higher-touch in the installation process and system maintenance, vFunction recommends to install Docker on a RedHat Server when possible. The steps below outline how to install Docker on a RedHat Server.


How to Install Docker on an Online RedHat Server

Take the following steps to install Docker on a RedHat Server.

  1. Uninstall any older versions of Docker that may be running on the machine
sudo yum remove -y docker \
    docker-client \
    docker-client-latest \
    docker-common \
    docker-latest \
    docker-latest-logrotate \
    docker-logrotate \
    docker-engine \
    podman
  1. Set up the Docker Yum Repository
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  1. Install the relevant Docker packages
sudo yum install docker-ce \
    docker-ce-cli \
    containerd.io \
    docker-buildx-plugin \
    docker-compose-plugin
  1. Start Docker
sudo systemctl start docker

How to Install Docker on an Offline RedHat Server

Take the following steps to install Docker on a RedHat Server.

  1. Uninstall any older versions of Docker that may be running on the machine
sudo yum remove -y docker \
    docker-client \
    docker-client-latest \
    docker-common \
    docker-latest \
    docker-latest-logrotate \
    docker-logrotate \
    docker-engine \
    podman
  1. Locally, choose the RPM that matches your RedHat version
  1. Go to https://download.docker.com/linux/centos/
  2. Choose your version of RedHat.
  3. Browse to x86_64/stable/Packages/
  4. Download the .rpm file for docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, docker-compose-plugin
  1. Move the five RPMs to your RedHat Server
  2. Install the five RPMs
  • Replace the VERSION information with the actual file details
  • Note that the installation of these five RPMs may require additional dependencies
cd /path/to/location/of/rpms
sudo yum install ./docker-ce.VERSION.rpm \
    ./docker-ce-cli.VERSION.rpm \
    ./containerd.io.VERSION.rpm \
    ./docker-buildx-plugin.VERSION.rpm \
    ./docker-compose-plugin.VERSION.rpm
  1. Start Docker
sudo systemctl start docker