bind mount to app path then sync

This commit is contained in:
Leon 2017-02-15 07:25:19 +13:00
parent 7c47f1d9aa
commit a21014b327
2 changed files with 5 additions and 1 deletions

View file

@ -6,7 +6,10 @@ cd /var/www/html
# install default
wp --allow-root core install --url='172.17.0.3' --title='wp plugindev' --admin_user=admin --admin_password=admin --admin_email=blah@blah.com --skip-email
# www-data to own plugin src files which have been bound
# copy plugin source files to WP path (else changing ownership will change on host)
cp -r /app wp-content/plugins/wordpress-static-html-output
# www-data to own plugin src files
chown -R www-data:www-data wp-content/plugins/wordpress-static-html-output
chown -R www-data:www-data wp-content/uploads

View file

@ -32,6 +32,7 @@ To quickly try out the plugin, without affecting your other WordPress installati
- `docker build -t leonstafford/wordpress-static-html-plugin:latest # add zip extension and WP cli on top of latest WordPress Docker image
- `docker run --name devmysql -e MYSQL_ROOT_PASSWORD=banana -d mariadb` # run a MySQL container for the WordPress one to later use
- `docker run --name plugindevwp --link devmysql:mysql -p 8080:80 -d wordpress` # run the official WordPress image, linking to your MySQL instance
- sudo docker run --name plugindevwp --link devmysql:mysql -p 8080:80 -d -v /home/leon/wordpress-static-html-plugin/:/app leonstafford/wordpress-static-html-plugin # run the customized WP image, bind mounting the dev sources to /app dir
- `docker exec -it plugindevwp bash` # get CLI access to the container
- `sh /post_launch.sh` # install WP; install and activate static output plugin
- `exit` # leave the container's shell