Enabling Docker on RHEL8 - jrcloudsolutions/tidbits GitHub Wiki

Red Hat wants you to use their Podman Container Runtime instead of Docker. As a result the following workaround is available to run Docker on RHEL8:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum repolist sudo yum-config-manager --disable docs.docker.com_engine_install_centos (in case I get a 404 error with conflicting repos) sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Then, I got errors:

  • package runc-4:1.1.12-1.rhaos4.15.el8.x86.... from rhocp.............-rpms is filtered out by modular filtering (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use only best candidate packages)

Then, edit /etc/yum.repos.d and add module_hotfixes=1 to the [epel] section

If the filterout message still exists use the --allowerasing switch sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin --allowerasing

$groups

$newgrp docker (restarts the group and adds the gitlab-runner user instead of rebooting?)

If not created, manually crate the Docker group and add the user i.e. rodriguezj to the Docker group: sudo usemod -a -G docker gitlab-runner (a reboot is needed after adding the gitlab-runner user to the docker group)

$systemctl status docker $systemctl start docker $systemctl enable docker (automatically loads docker upon reboot)

$sudo fips-mode-setup --check (check to see if fips is enabled) $sudo fips-mode-setup --disable (disables fips just in case there are any issues just for testing purposes)

Then, reboot.

systemctl disable fapolicyd <---- This was the solution to be able to get rid of the the pipeline permission error. fapolicyd is a Red Hat whitelisting application)

docker images

docker run -it (to test to be able to exec into an image with Docker)

⚠️ **GitHub.com Fallback** ⚠️