Public | Automated Build

Last pushed: 2 years ago
Short Description
Wordpress container (no longer supported)
Full Description

Warning

Note that this image is no longer supported.

Summary

Wordpress web site image including an Apache HTTP server. The web site data are
stored in the cburki/wordpress-data volume container and the MySQL database
server is running in the cburki/mysql container.

Build the image

To create this image, execute the following command in the docker-wordpress
folder.

docker build -t cburki/wordpress .

Configure the image

A database and a user are created when the image is run for the first time.
The database is named wordpress and the database user is named wordpress.
The password for the database user can be configured with an environment variable.

  • WORDPRESS_DB_PASSWORD : The Wordpress database password
  • MYSQL_PASSWORD : The MySQL server root password needed to create the Wordpress database and user.

If no wordpress password is given, a default one is generated. You can get this
password by viewing the file /data/var/state/wordpress-db-pwd.txt using the
following command.

docker exec -it wordpress cat /data/var/state/mysql-wordpress-pwd.txt

Run the image

When you run the image, you will bind the port 80 for the HTTP server. You will
use a volume data image to store the web site files which are located in the
/data/var/www/wordpress folder.

docker run \
    --name wordpress \
    --volumes-from wordpress-data \
    -d \
    -e WORDPRESS_DB_PASSWORD=my_secret_password \
    -e MYSQL_PASSWORD=mysql_secret_password \
    -p 8080:80 \
    --link mysql:db \
    cburki/wordpress:latest

In the --link argument, mysql is the name of the MySQL server container and db
is the alias to reach the MySQL server over the network.

The volume data container could be started using the following command.

docker run \
    --name wordpress-data \
    -d \
    cburki/volume-data:latest

The wordpress web site could be reached using the following URL.

http://<ip_address>:8080

It first ask you some questions to setup the Wordpress web site.

Docker Pull Command
Owner
cburki
Source Repository