
Podman is a modern, secure, and lightweight tool that helps you package and run applications in isolated environments (containers) on your computer, without needing to be the all-powerful administrator.
I was running my local WordPress setup on Docker Desktop, but then I discovered Podman and switched.
Why did I switch?
Because Podman is fully open-source and I feel comfortable using the terminal to create, starts and turn off my local sites.
I haven’t run into any issues since I started using it, so I don’t think I will change my mind anytime soon.
This is how you use it
Install Podman via Homebrew
I worked on a Mac so I install and update pretty much all apps via Homebrew
If you have Homebrew installed, the installation process is pretty straight-forward
brew install podman
To make sure everything is working as expected, run this command on the terminal
podman --version
After that you should install Podman Compose
brew install podman-compose
This is how you check the podman-compose version
podman-compose --version
Create a YAML File
I don’t create the file from scratch, I change a few things form previous working files
I bet you can improve it but this one works well for me
version: '3.8'
services:
enp_wordpress:
image: wordpress:latest
container_name: tlb_wordpress_site
restart: "no"
ports:
- "8078:80"
environment:
WORDPRESS_DB_HOST: tlb_db:3306
WORDPRESS_DB_NAME: tlb_wordpress_db
WORDPRESS_DB_USER: tlb_user
WORDPRESS_DB_PASSWORD: tlb_password
volumes:
- ./tlb_wordpress_data:/var/www/html
networks:
- tlb_net
enp_db:
image: mariadb:latest
container_name: tlb_mariadb_db
restart: "no"
environment:
MYSQL_ROOT_PASSWORD: tlb_root_password
MYSQL_DATABASE: tlb_wordpress_db
MYSQL_USER: tlb_user
MYSQL_PASSWORD: tlb_password
volumes:
- ./tlb_db_data:/var/lib/mysql
networks:
- tlb_net
enp_adminer:
image: adminer:latest
container_name: tlb_adminer
restart: "no"
ports:
- "8077:8080"
networks:
- tlb_net
tln_wpcli:
image: wordpress:cli
container_name: enp_wpcli
depends_on:
- tlb_wordpress
- tlb_db
entrypoint: ["wp"]
tty: true
stdin_open: true
restart: "no"
volumes:
- ./tlb_wordpress_data:/var/www/html
environment:
WORDPRESS_DB_HOST: tlb_db:3306
WORDPRESS_DB_NAME: tlb_wordpress_db
WORDPRESS_DB_USER: tlb_user
WORDPRESS_DB_PASSWORD: enp_password
networks:
- tlb_net
volumes:
enp_wordpress_data:
driver: local
enp_db_data:
driver: local
networks:
enp_net:
driver: bridge
When you have your YAML file ready, place it inside the folder where you want to have your database and WordPress installation files
Start Podman
Now, Go to the folder where the YAML file is using via the terminal and run this command
podman-compose up -d
Now go to the local WordPress by visiting the port you specified in the YAML file
https://localhost:8078
You will see a message prompting to choose the language for your WordPress installation and create a WordPress user


