Wordpress container (NO LONGER MAINTAINED)
8.7K
Note that this image is no longer supported.
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.
To create this image, execute the following command in the docker-wordpress folder.
docker build -t cburki/wordpress .
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.
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
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.
Content type
Image
Digest
sha256:7984606ac…
Size
215.5 MB
Last updated
almost 11 years ago
docker pull cburki/wordpress