I have a standard Laradock setup. One is specifically for Drupal 8 development and I've installed the Drupal console fine such that it can be run from anywhere within the workspace container.
I am now trying to get the drush command to do the same. Drush is installed correctly but everything I've tried for adding the drush executable path to the .bashrc path doesn't seem to be working.
I have specifically been following the article at: Updating PATH environment variable permanently in Docker container but unsuccessfully.
Currently I have setup an environment variable in the laradock .env file as follows:
PROJECT_PATH_TO_VENDOR_DRUSH="/var/www/example_website/public_html/vendor/drush/drush"
Then within the Dockerfile
for the workspace I have added the line:
ENV PATH "${PATH}:${PROJECT_PATH_TO_VENDOR_DRUSH}"
I then rebuild via the command docker-compose build workspace
, bootstrap and then bash into the workspace.
Reviewing the content of the ~/.bashrc
reveals nothing though. If I run manually export PATH=$PATH:/var/www/example_website/public_html/vendor/drush/drush
everything then works fine, but this obviously disappears when I restart the container at any stage.
Could someone point out where I've gone wrong pleasE?
Many thanks John