Skip to content

Instantly share code, notes, and snippets.

@rdlmda
Last active October 3, 2016 15:40
Show Gist options
  • Save rdlmda/297e5c5a0ea8309921c55d89957ccd30 to your computer and use it in GitHub Desktop.
Save rdlmda/297e5c5a0ea8309921c55d89957ccd30 to your computer and use it in GitHub Desktop.
Dockerized CLI CMS tools
Context-agnostic WP-CLI, Drush and Drupal running each on a Docker container and interacting with other containers
#!/bin/bash
docker run --rm --link "$1"_database_1:postgres --volumes-from "$1"_drupal_1 --net "$1"_default -w /var/www/html -it drupalconsole drupal "${@:2}"
#!/bin/bash
docker run --rm --link "$1"_database_1:postgres --volumes-from "$1"_drupal_1 --net "$1"_default -w /var/www/html -it drush drush "${@:2}"
#!/bin/bash
docker run --rm --link "$1"_database_1:mysql --volumes-from "$1"_drupal_1 --net "$1"_default -w /var/www/html -it wpcli wp --allow-root "${@:2}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment