After successfully using Podman Desktop on my Linux Mint desktop, I wanted to see how Podman would install on my M3 MacBook Air. Although I completed the installation, I struggled to connect to the Linux VM on macOS. That was because I failed to read the excellent documentation from Red Hat on the Podman software site. Eager to try containerized images, I opted to install Docker instead and set up WordPress to gain more experience with containers using a different container management tool. I had much more success after installing Docker Desktop via Homebrew. I used Google Gemini to help me get the steps for a successful installation.
brew install docker
brew install docker-desktop
Once I had Docker installed, I did some further reading and research and found some directions that worked for me with a few modifications. I am sharing them because you may be learning how to do this too, and I hope this makes your journey easier.
mkdir ~/wp-docker-local
cd ~/wp-docker-local
Create a YAML file inside this new directory,
nano docker-compose.yaml
Copy the following code into the YAML file:
services:
db:
image: mysql:8.0
container_name: wp_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: secret_root_pass
MYSQL_DATABASE: wordpress
MYSQL_USER: wp_user
MYSQL_PASSWORD: secret_wp_pass
volumes:
- db_data:/var/lib/mysql
networks:
- wp_network
wordpress:
depends_on:
- db
image: wordpress:latest
container_name: wp_app
restart: always
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wp_user
WORDPRESS_DB_PASSWORD: secret_wp_pass
WORDPRESS_DB_NAME: wordpress
volumes:
- ./wp-content:/var/www/html/wp-content
networks:
- wp_network
volumes:
db_data:
networks:
wp_network:
driver: bridge
Be sure that Docker is running and issue the following command in a terminal on your Mac:
docker compose up -d
Docker will automatically create the wp_network bridge network, download the official MySQL and WordPress images, mount your local directories, and link the services together. Then you point your browser to http://localhost:8080
When the browser is open, you’ll be able to finish the installation and configure your new WordPress blog.

When prompted, you will need to create an administrator username and password. I use Bitwarden to securely store those passwords. There may come a time when you accidentally misconfigure things and want to start over—like I did when I forgot to enter the correct strong password. This WordPress container was running locally, and I couldn’t reset the password via email. After some frustration deleting and restarting containers without success, I found a fail-safe way to remove the container and its associated files and start over. To do this, navigate to the installation folder and enter the following command.
docker compose down -v
The -v flag is essential, as it removes the containers, the shared network, and the persistent database volumes, permanently deleting all your posts, themes, and configurations.
Setting up WordPress with Docker on macOS can be rewarding, offering valuable hands-on knowledge of containerization and application deployment. The initial challenges with Podman led me to try another way, and in the process I learned much that I would not have learned otherwise. This process not only allowed me to successfully install and configure WordPress but also deepened my understanding of container management tools. I hope the steps and insights shared in this guide help simplify your own journey into the world of containers. Experimentation and learning from setbacks are key components of mastering these technologies.