Skip to content

Instantly share code, notes, and snippets.

@edcote
Last active May 6, 2018 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edcote/372025769f14c0df320dab6b2b9046e2 to your computer and use it in GitHub Desktop.
Save edcote/372025769f14c0df320dab6b2b9046e2 to your computer and use it in GitHub Desktop.
Wordpress

Running WordPress in a container

This exercise was beyond successful.

docker run -e MYSQL_ROOT_PASSWORD=<password> -e MYSQL_DATABASE=wordpress --name wordpressdb -v "$PWD/database":/var/lib/mysql -d mariadb:latest
docker run -e WORDPRESS_DB_PASSWORD=<password> --name wordpress --link wordpressdb:mysql -p 80:80 -v "$PWD/html":/var/www/html -d wordpress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment