Last active
October 6, 2016 14:54
-
-
Save ianlintner-wf/cb14a12c2c5bba26da18 to your computer and use it in GitHub Desktop.
Local Drush to Drupal Docker Client no SSH. Scripts for making a special Drush prompt that will run drush commands in the specified docker container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CONTAINER=drupal | |
export DRUSHROOT=/var/www/docroot | |
export SITEHOST=drupal.loc | |
alias drush="docker exec -it $CONTAINER drush --root=$DRUSHROOT -l $SITEHOST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Important must run with ". "! | |
#. scripts/drush-end.sh | |
PS1="${PS1/ \[$CONTAINER\] /}" | |
unset CONTAINER | |
unset DRUSHROOT | |
unset SITEHOST | |
unalias drush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put in a scripts folder in your drupal and run with source | |
#Important must run with ". "! | |
#. scripts/drush-start.sh drupal7 drupal.loc /var/www | |
export CONTAINER=$1 | |
export SITEHOST=$2 | |
export DRUSHROOT=$3 | |
alias drush="docker exec -it $CONTAINER drush --root=$DRUSHROOT -l $SITEHOST" | |
$PS1="$PS1 [$CONTAINER]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put in a scripts folder in your drupal and run with source | |
#Important must run with ". "! | |
#. scripts/drush-start.sh | |
export CONTAINER=drupal | |
export SITEHOST=drupal.loc | |
export DRUSHROOT=/var/www/docroot | |
alias drush="docker exec -it $CONTAINER drush --root=$DRUSHROOT -l $SITEHOST" | |
$PS1="$PS1 [$CONTAINER]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment