Wednesday, December 23, 2020

Installing Wordpress using Podman

Podman is a daemonless container engine to manage OCI containers. To run a set of containers for wordpress installation, below are the steps. To install podman in centos 8, you can refer here.

First you need to create a pod, so that the containers can talk to each other easily within the pod. Expose port 8080 for the pod to reach port 80 in the pod

# podman pod create --name mywordpress --publish 8080:80

Wordpress consists of 2 components, a wordpress front end and a database backend. We will create the backend first, using mysql image from dockerhub. Make sure to include the newly created container into our pod.

# podman run --detach --pod mywordpress \


-e MYSQL_DATABASE=mywpdb \

-e MYSQL_USER=mywpuser \


--name mywpdb

We will then proceed to create a wordpress container. We will use (localhost) as reference to our mysql container, because both containers are in the same pod.

# podman -run --detach --pod mywordpress \



-e WORDPRESS_DB_USER=mywpuser \


--name mywp

Open a web browser, and browse to localhost:8080 (or <ip address>:8080), to get the wordpress installer wizard. Follow through the wizard to continue the wordpress installation.

No comments: