Quick and easy to use Docker container for your local Drupal development. It contains a LAMP stack and an SSH server, along with an up to date version of Drush. It is based on Ubuntu Trusty.
timbrandin/drupal.This image contains:
root: (no password)root:rootClone the repository locally and build it:
git clone https://github.com/timbrandin/docker-drupal.git
cd docker-drupal
docker build -t yourname/drupal .
Get the image:
docker pull timbrandin/drupal
docker run -d -P --name drupal -t timbrandin/drupal
Notice! We're automounting the exposed ports with
-P.
Here's an example running the container and forwarding localhost:8080 to the container, (notice on OSX/Windows it will be your virtual machine's IP instead of localhost):
docker run -d -p 8080:80 --name drupal -t timbrandin/drupal
Here's an example running the container, forwarding port 8080 like before, but also mounting the containers web folder var/www/ to my local web/ folder with Drupal. I can then start writing code on my local machine, directly in this folder, and it will be available inside the container:
docker run -d -p 8080:80 --name drupal -v `pwd`/web:/var/www/ -t timbrandin/drupal
Open a terminal to your Docker container:
docker exec -it drupal /bin/bash
Run Drush commands like these on your site.
drush pm-update
Content type
Image
Digest
sha256:94b83a67c…
Size
247.7 MB
Last updated
about 11 years ago
docker pull timbrandin/drupal