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

When running a script on the container, the APP_ROOT is checked last #118

Open
mattsqd opened this issue Aug 13, 2020 · 0 comments
Open

Comments

@mattsqd
Copy link

mattsqd commented Aug 13, 2020

ENV PATH="${PATH}:/home/wodby/.composer/vendor/bin:${APP_ROOT}/vendor/bin:${APP_ROOT}/bin" \

Sets APP_ROOT/vendor/bin and APP_ROOT/bin as last checked in $PATH, so if one does a
docker exec -ti php sh -c "drush status"
They will see: Drush script : /usr/local/bin/drush
Instead of: Drush script : /var/www/html/vendor/drush/drush/drush
If I have a script installed via composer, I would think it would take precedence over /usr/local/bin.
The $PATH is currently:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/wodby/.composer/vendor/bin:/var/www/html/vendor/bin:/var/www/html/bin
I would think:
ENV PATH="/home/wodby/.composer/vendor/bin:${APP_ROOT}/vendor/bin:${APP_ROOT}/bin:${PATH}"
would be more useful in the Dockerfile.
With how it is, one cannot use XDebug to debug CLI scripts since the Drush files live outside the sites shared volume.

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

1 participant