Public | Automated Build

Last pushed: 2 years ago
Short Description
Ready-to-use WordPress using WP-CLI and the PHP's built-in web server, for development purposes.
Full Description

Automatically download, configure, install and run WordPress thanks to WP-CLI.

Warning: WordPress is launched wih the PHP's built-in web server. It is not intended to be a full-featured web server. It should not be used on a public network.

How to use it

With docker compose

The simplest is to use docker compose:

docker-compose up -d

This launch two containers:

When you start the containers with docker-compose, you can adjust the configuration in the .env file (see “Environment Variables” for possible values).

With docker engine

docker build -t wp .
docker run -d -e MYSQL_HOST=<host> -e MYSQL_USER=<username> -e MYSQL_PASSWORD=<password> -e MYSQL_DATABASE=<database for wordpress>

When you start the containers with docker-compose, you can set environment variables with -e <NAME>=<VALUE> parameters.

Environment Variables

  • MYSQL_ROOT_PASSWORD
  • MYSQL_HOST=db:
  • MYSQL_PORT=3306:
  • MYSQL_USER=root
  • MYSQL_PASSWORD=root
  • MYSQL_DATABASE=wp
  • WORDPRESS_URL=wordpress
  • WORDPRESS_TITLE=WordPress site
  • WORDPRESS_ADMIN_USER=admin
  • WORDPRESS_ADMIN_PASSWORD=admin
  • WORDPRESS_ADMIN_MAIL=admin@example.com

See also

Docker Pull Command
Owner
mbovel