Skip to content

Instantly share code, notes, and snippets.

@waltspence
Forked from tatemz/docker-wordpress.sh
Created August 12, 2016 07:35
Show Gist options
  • Save waltspence/ca0da08447c1e67f82e9fb0c3a7d9216 to your computer and use it in GitHub Desktop.
Save waltspence/ca0da08447c1e67f82e9fb0c3a7d9216 to your computer and use it in GitHub Desktop.
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
my-wpdb:
image: mariadb
ports:
- "8081:3306"
environment:
MYSQL_ROOT_PASSWORD: ChangeMeIfYouWant
my-wp:
image: wordpress
volumes:
- ./:/var/www/html
ports:
- "8080:80"
links:
- my-wpdb:mysql
environment:
WORDPRESS_DB_PASSWORD: ChangeMeIfYouWant
EOL
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment