RobLoach / drush-docker

:whale: Docker Container to run Drush
http://registry.hub.docker.com/u/drush/drush
Other
19 stars 19 forks source link

Basic usage issue #51

Open whittaker007 opened 6 years ago

whittaker007 commented 6 years ago

Hi there, sorry if I'm misunderstanding something but the readme is a bit sparse. I followed the instructions and I get results, just not what I'm expecting. When I run:

docker run -v $(pwd):/drupal_php_1 drush/drush status

I get:

PHP configuration      :                       
PHP OS                 :  Linux                
Drush script           :  /usr/local/bin/drush 
Drush version          :  8.1.15               
Drush temp directory   :  /tmp                 
Drush configuration    :                       
Drush alias files      :                       

So it's detecting the OS and Drush version, but nothing from my Drupal site (drupal_php_1).

What am I missing?

RobLoach commented 6 years ago

You'll want to connect the Docker instance with your database service. Can do that by exposing and mapping ports: https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p-expose

It's much easier to handle it all through Docker compose if you have access to that. There are a few discussions about it with Drush over at https://github.com/RobLoach/drush-docker/issues/32 .