node package manager



A basic generator for docker4drupal stack that permits easily the generation of a docker4drupal (drupal 7 or 8) project.


First, install Yeoman and generator-docker4drupal using npm (we assume you have pre-installed node.js).

$ npm install -g yo
$ npm install -g generator-docker4drupal


Generate your new project:

$ mkdir drupal8
$ cd drupal 8
$ yo docker4drupal

Generated project will contain the following structure:

+-- certs
|   +-- cert.pem
|   +-- key.pem
+-- docker
|   +-- docker-compose.yml
|   +-- docker-sync.yml
|   +-- examples
|       +--
|       +-- settings.local.php
+-- docroot

The certs folder provides pre-generated self signed certificates for using https when accessing Drupal.

The docker/examples folder provides recommended settings for generated Drupal project.

The docroot folder will be populated with vanilla Drupal from docker4drupal when containers are initialised, if instead custom was used, its required to manual add the Drupal files in docroot/web.

The bash script file can be used for various operations:



      start     Starts docker-sync and docker-compose containers.
      stop      Stops docker-sync and docker-compose containers.
      shell     Opens a bash shell in the docker php container.
      status    Display status of running containers.
      hosts     Add container endpoints to /etc/hosts file (requires sudo).
                Use sudo ./ hosts
      recreate  Recreates all containers (ALL DATA WILL BE ERASED)
      help      Display list of useful docker commands.

Getting To Know Yeoman

  • Yeoman has a heart of gold.

  • Yeoman is a person with feelings and opinions, but is very easy to work with.

  • Yeoman can be too opinionated at times but is easily convinced not to be.

  • Feel free to learn more about Yeoman.


MIT © [Paulo Gomes]