forked from jrichardsz/wordpress-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Run with docker
JRichardsz edited this page Jan 30, 2024
·
1 revision
docker build -t wordpress:6.4.2.
To understand the variables, read that section in the readme.md
export RANDOM_KEY=$(uuidgen)
docker run -d --name wordpress -it --rm -p 80:80 \
-e DB_HOST=10.10.10.10:3306 \
-e DB_USER=root \
-e DB_PASSWORD=secret \
-e DB_NAME=wordpress \
-e AUTH_KEY=$RANDOM_KEY \
-e SECURE_AUTH_KEY=$RANDOM_KEY \
-e NONCE_KEY=$RANDOM_KEY \
-e LOGGED_IN_KEY=$RANDOM_KEY \
-e AUTH_SALT=$RANDOM_KEY \
-e SECURE_AUTH_SALT=$RANDOM_KEY \
-e LOGGED_IN_SALT=$RANDOM_KEY \
-e NONCE_SALT=$RANDOM_KEY \
-e WP_DEBUG=true \
-e DISABLE_WP_CRON=true \
-e TZ=America/Lima wordpress:5.7.2
Required variables could be configured remotely to avoid shell access.
docker run -d --name wordpress -it --rm -p 80:80 \
-e CONFIGURATOR_GET_VARIABLES_FULL_URL=http://foo.com/api/v1/variables?application=wordpress \
-e CONFIGURATOR_AUTH_HEADER=apiKey:changeme \
-e TZ=America/Lima wordpress:5.7.2