Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some drush commands don't work with docker #23

Closed
johnennewdeeson opened this issue Jun 2, 2017 · 3 comments
Closed

some drush commands don't work with docker #23

johnennewdeeson opened this issue Jun 2, 2017 · 3 comments
Assignees

Comments

@johnennewdeeson
Copy link
Contributor

Current approach of using the 'php' option in the drush alias file to specify a passthrough script isn't working for all commands.

e.g. drush @docker status works whereas drush @docker uli does not work

It seems that local drush is making decisions about wether the command can be run and trying to access the db before its passed over to the passthrough script.

Not sure what the best solution is. I've created a script at ./scripts/drush which means locally I can run all drush commands on docker like this

$> ../scripts/drush @docker uli

which works for me. This script looks like this:

#!/bin/bash
docker-compose exec --user 82 php ./vendor/bin/drush --root=./docroot "${@:1}"
@johnennewdeeson
Copy link
Contributor Author

Its not very elegant as it requires a different approach to running drush commands on the docker environment to the other environments. However, not sure what else to do without changing drush to support docker better,

@johnennewdeeson
Copy link
Contributor Author

@markpdeeson - the uli command still doesn't work with the ssh container added by #24 above. The problem seems to be with broken SSH pipes inside of PHP. After playing about with drush for a bit I found if you comment out a bizarre line in backend.inc then it starts working (line 389...)

    // If we do not close stdin here, then we cause a deadlock;
    // see: http://drupal.org/node/766080#comment-4309936
    // If we reimplement interactive commands to also use
    // _drush_proc_open, then clearly we would need to keep
    // this open longer.
    //fclose($process['pipes'][0]);

that fclose seems to have been put in place for Windows users and the comment referenced says it doesn't seem to matter on Linux whether its there or not...

@johnennewdeeson
Copy link
Contributor Author

Raised a (hopeful!) issue with drush incase they can shed any light into this! drush-ops/drush#2805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants