Docker Compose with Podman Redhat Enterprise Linux 8

Docker Compose with Podman Redhat Enterprise Linux 8

Docker Compose with Podman Redhat Enterprise Linux 8

Introduction

Below is the steps to get docker-compose working with podman. Note, that podman runs in essentially two modes. System mode (owned by root) or User mode where it runs when the user logs in. For development you will want it in user mode if you intend to do development with docker-compose.

Installation


sudo curl -SL https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Switch Podman from System Mode to User Mode

# may not be necessary
sudo systemctl disable --now podman podman.socket
# necessary
systemctl enable --now --user podman podman.socket
echo export DOCKER_HOST=unix://`podman info --format '{{.Host.RemoteSocket.Path}}'` >> ~/.bashrc

Thats it, you now have docker-compose running with podman in usermode.

If you are new to podman, skopeo, buildah, or want a refresher there is a great whitepaper at redhat. You can access it with a free Developer account at Redhat: RHEL 9 building running and managing containers PDF.