Sign inSign up

portlandwebworks/drupal-drush-dev

By portlandwebworks

•Updated about 9 years ago

A Drush development image configured for Drupal.

Image
0

1.5K

portlandwebworks/drupal-drush-dev repository overview

⁠Drupal Drush Dev

⁠Overview

A Drush development image configured for Drupal.

⁠Usage

  • Mount a directory containing your public key file named id_rsa.pub to /var/drush.
  • Mount the Drupal root directory to /var/www/html.
  • Update your ssh config, hosts file and Drush aliases to point to this container.

Note that Drush will use the mounted Drupal's settings.php for credentials. Provide the necessary information to Drush via environment variables.

⁠Support files templates
⁠Hosts
127.0.0.1 local.yoursite.com
⁠ssh config
Host local.yoursite.com
     Port 2222
     User root
     IdentityFile ~/.ssh/yourprivatekey
⁠Drush alias
$aliases['local'] = [
    'remote-host' => 'local.yoursite.com',
    'remote-user' => 'root',
    'ssh-options' => '-p 2222',
    'db-url' => '',
    'root' => '/var/www/html',
    'uri' => 'http://local.yoursite.com',
    'path-aliases' => [
        '%dump-dir' => "/tmp/backup",
        '%dump' => '/tmp/backup/db.sql'
    ],
];

⁠Compose

project-drush:
  build: portlandwebworks/drupal-drush-dev
  volumes:
    - path/to/public/key/dir:/var/drush
    - path/to/site:/var/www/html

⁠Run

docker run -d -v path/to/public/key/dir:/var/drush -v path/to/site:/var/www/html portlandwebworks/drupal-drush-dev

Tag summary

Content type

Image

Digest

Size

181.4 MB

Last updated

about 9 years ago

docker pull portlandwebworks/drupal-drush-dev