Skip to content

A minimal development environment for drupal 8 with drush and phpmyadmin using docker

Notifications You must be signed in to change notification settings

lexsoft00/drupal8docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drupal 8 docker package

Install on Windows

Install Docker.

Restart the machine when prompted to activate Hyper-V (Windows 10 Pro - 64bit required. Virtualbox or similar may be required on other systems).

Install on other systems

Find the relevant Docker installer.

Run

Run docker-compose up in the repo root.

Visit the site on localhost:8090.

Visit phpmyadmin on localhost:8080.

Log in as the super user with user name admin and password 123 if you are not logged in as default.

Shut down

Shut down the docker network with docker-compose down.

Persistent storage

When running docker-compose up for the first time, the database is initialized from the sql image included in ./docker/mysql. This data persists in the sql data volume until the network is taken down with docker-compose down -v (warning: this will remove all data on your site with no warning prompt, be sure to take a backup).

You can start over with a new install by removing the COPY statement from ./docker/mysql/Dockerfile and deleting the files ./docker/project/sites/default/settings.php and ./docker/mysql/init.db.

The included image, init.sql, is a clean standard install of Drupal 8, take a look at db.config.png to see how it was set up. All passwords is set to 123, remember to change these.

Environment variables

All vars is moved to ./docker/project/environment.env to try to streamline the setup. You might want to change some of these.

Drush

Drush is included in the image, to use it exec into the running container.

Find the container ID by running docker container ls.

Exec into the container by running docker exec -ti xyz /bin/bash where xyz is the first couple of digits in the ID hex. Now you can drush.

About

This project was created out of the frustrations of getting drush to work with docker. Feel free to use this project as you see fit without guaranties of any kind.

About

A minimal development environment for drupal 8 with drush and phpmyadmin using docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 81.1%
  • HTML 10.1%
  • CSS 5.0%
  • JavaScript 3.7%
  • Shell 0.1%