Docker

Docker Wordpress Setup

Since the Docker Wordpress image does not contain its own copy of MySQL, the setup requires a few more steps than most other containers.  The script below can be used as a starting point for creating and linking both required containers (at least for setting up a development environment).

1. Install and Run Containers:
#Remove containers (*be careful deleting if you already have images under these names!)
docker stop my_mysql_container my_wordpress_container;docker rm my_mysql_container my_wordpress_container;

#Create and run MySQL container:
docker run -dit --name my_mysql_container -e MYSQL_ROOT_PASSWORD=your_password_here mysql

#Create and run Wordpress container, linking to MySQL container:
docker run -dit --name my_wordpress_container --link my_mysql_container:mysql -p 80:80 -e WORDPRESS_DB_PASSWORD=your_password_here wordpress
2. Visit http://localhost to Complete Wordpress Setup:

Now you may visit http://localhost to complete the Wordpress setup.