In this blog post I will share how to configure an Oracle Linux 8.9 server and Podman to work with Docker Compose.
Docker Compose is a command-line tool used for defining and the running single, or multi-container applications.
Docker Compose simplifies the management of the entire application stack, making it easy to manage services, networks, and volumes all from a single, easy to read YAML (Yet-Another-Markup-Language) formatted file.
Install and confirm Podman installed
Install the Podman package if not already installed, using the below.
sudo dnf module install container-tools:ol8
Check the version of Podman using podman -v for example.
podman -v
[oracle@z-re-ol8 ~]$ podman -v
podman version 4.6.1
Confirm the Podman CLI is working ok.
podman run quay.io/podman/hello
[oracle@z-re-ol8 ~]$ podman run quay.io/podman/hello
Trying to pull quay.io/podman/hello:latest...
Getting image source signatures
Copying blob f05aaddf8ce5 done
Copying config ee835612d4 done
Writing manifest to image destination
!... Hello Podman World ...!
.--"--.
/ - - \
/ (O) (O) \
~~~| -=(,Y,)=- |
.---. /` \ |~~
~/ o o \~~~~.----. ~~
| =(X)= |~ / (O (O) \
~~~~~~~ ~| =(Y_)=- |
~~~~ ~~~| U |~~
Project: https://github.com/containers/podman
Website: https://podman.io
Desktop: https://podman-desktop.io
Documents: https://docs.podman.io
YouTube: https://youtube.com/@Podman
X/Twitter: @Podman_io
Mastodon: @Podman_io@fosstodon.org
Install the Podman Docker Package
Install the podman docker package to allow Podman to work natively with Docker commands.
sudo dnf install -y podman-docker
Install Docker Compose
Download and install Compose standalone.
sudo curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
[oracle@z-re-ol8 ~]$ sudo curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 42.8M 100 42.8M 0 0 26.4M 0 0:00:01 0:00:01 --:--:-- 79.2M
Add executable permissions to docker-compose.
sudo chmod +x /usr/local/bin/docker-compose
Confirm docker-compose is working
docker-compose version
[oracle@z-re-ol8 ~]$ docker-compose version
Docker Compose version v2.15.1
Start the Podman Socket
Configure the Podman socket using the below.
sudo systemctl enable --now podman.socket
sudo systemctl status podman.socket
[oracle@z-re-ol8 ~]$ sudo systemctl enable --now podman.socket
Created symlink /etc/systemd/system/sockets.target.wants/podman.socket → /usr/lib/systemd/system/podman.socket.
[oracle@z-re-ol8 ~]$ sudo systemctl status podman.socket
● podman.socket - Podman API Socket
Loaded: loaded (/usr/lib/systemd/system/podman.socket; enabled; vendor preset: disabled)
Active: active (listening) since Tue 2024-04-30 14:46:50 BST; 13s ago
Docs: man:podman-system-service(1)
Listen: /run/podman/podman.sock (Stream)
CGroup: /system.slice/podman.socket
Apr 30 14:46:50 z-re-ol8.uklab.purestorage.com systemd[1]: Listening on Podman API Socket.
Check that the socket works as expected using curl.
[oracle@z-re-ol8 ~]$ sudo curl -w "\n" -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/_ping
OK
If the Curl returns OK, then the compose functionality is successfully configured to work with docker-compose.yaml files.
In a follow-up post I share how we can use the above to deploy the Unified Observability for Oracle database using docker-compose.

