Public | Automated Build

Last pushed: 5 months ago
Short Description
A Drush development image configured for Drupal.
Full Description

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
Docker Pull Command
Owner
portlandwebworks
Source Repository