Dockerfile and etc for a Wordpress docker image
Shell
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead, 22 commits behind jbfink:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Dockerfile
LICENSE.txt
README.md
foreground.sh
start.sh
supervisord.conf

README.md

(note: Eugene Ware has a Docker wordpress container build on nginx with some other goodies; you can check out his work here.)

(N.B. the way that Docker handles permissions may vary depending on your current Docker version. If you're getting errors like

dial unix /var/run/docker.sock: permission denied

when you run the below commands, simply use sudo. This is a known issue.)

This repo contains a recipe for making a Docker container for Wordpress, using Linux, Apache and MySQL. To build, make sure you have Docker installed, clone this repo somewhere, and then run:

docker build -t <yourname>/wordpress .

Or, alternately, build DIRECTLY from the github repo like some sort of AMAZING FUTURO JULES-VERNESQUE SEA EXPLORER:

docker build -t <yourname>/wordpress git://github.com/jbfink/docker-wordpress.git

Then run it! Woo!

docker run -d <yourname>/wordpress

Check docker logs after running to see MySQL root password and Wordpress MySQL password, as so

echo $(docker logs <container-id> | grep password)

(note: you won't need the mysql root or the wordpress db password normally)

Then find the external port assigned to your container:

docker port <container-id> 80 

Visit in a webrowser, then fill out the form. No need to mess with wp-config.php, it's been auto-generated with proper values.

Note that this image now has a user account (appropriately named "user") and passwordless sudo for that user account. The password is generated upon startup; check logs for "ssh user password", docker ps for the port assigned to 22, and something like this to get in:

ssh -p <port> user@localhost