Public | Automated Build

Last pushed: a year ago
Short Description
Docker Container to run Drupal Console https://hub.docker.com/r/drupalconsole/console
Full Description

Drupal Console Docker Container

Supported tags and respective Dockerfile links

  • 1.0
  • 1.0-alpine
  • 1.0-php5
  • 1.0-php5-alpine
  • 1, latest
  • master
  • master-php5
  • master-alpine
  • master-php5-alpine

What is Drupal Console?

A Docker container to run Drupal Console, The new CLI for Drupal as well as a tool to generate boilerplate code, interact with and debug Drupal.

Usage

This covers how to run the Drupal Console container through the Docker CLI.

Pull

Pull drupalconsole/console from the Docker repository:

docker pull drupalconsole/console

Alternatively, you can download a specific version of Drupal Console:

docker pull drupalconsole/console:1.0

Run

To execute Drupal Console directly, run the container with docker run, mounting the /app volume:

docker run -v $(pwd):/app drupalconsole/console
docker run -v $(pwd):/app drupalconsole/console help
docker run -v $(pwd):/app drupalconsole/console --version
docker run -v $(pwd):/app drupalconsole/console status

If you installed a specific version of Drupal Console, run it with:

docker run -v $(pwd):/app drupalconsole/console:1.0 --version

Development

  1. Download the source:

    git clone https://github.com/sylus/docker-drupalconsole.git
    cd docker-drupalconsole
    
  2. Build one of the images:

    docker build -t drupalconsole/console:1.0 1.0
    
  3. Use the Makefile to build and test all images:

    make
    
  4. Visit the drupalconsole/console Docker Hub for build details.

  5. Submit Pull Requests and create issues for new changes and features you'd like to add.

How to use this image.

Installation / Usage

  1. Install the drupalconsole/console container:

     $ docker pull drupalconsole/console
    

    Alternatively, pull a specific version of drupalconsole/console:

     $ docker pull drupalconsole/console:1.0
    

Image Variants

drupalconsole/console:<version>

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

drupalconsole/console:php5

This is made to run Composer through PHP 5, rather then the default of PHP 7.

drupalconsole/console:alpine

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

drupalconsole/console:php5-alpine

This is made to run Composer through PHP 5, rather then the default of PHP 7, through the Alpine container.

Docker Pull Command
Owner
drupalconsole
Source Repository

Comments (1)
qstraza
8 months ago

In order to run this, you also need to use --root option which takes path to where you drupal lies. Example:

docker-compose run --rm drupal --root=/var/www/html

You may alias it like this:
alias drupal='docker-compose run --rm drupal --root=/var/www/html'