Giter VIP home page Giter VIP logo

docker-drupal's Introduction

A Drupal Docker image for testing and development

This project was developed in order to allow local development of Drupal modules, particularly Realistic Dummy Content.

The idea is to provide a starting point to easily provision a development environment using Docker on a CoreOS Vagrant machine. For a tutorial on how to use Docker and Vagrant, see the first class at Dcycle U..

The blog post Continuous integration with Circle CI and Docker for your Drupal project (Dcycle project, Feb. 20, 2015) provides more details on how to set this up.

Branches

The following branches' code always download the latest stable version of Drupal. For example, running 7.x-dev-1.x might download 7.23 one day, and 7.24 the next. Branch names use the Drupal branch followed by the type of box (dev for development--the only one for now--, eventually prod and test), followed by the version branch of the Dockerfile:

In this branch, the Drupal version is hard-coded, so that the same version of the Dockerfile always downloads a fixed version of Drupal. This is considered by some to be more robust, less prone to breaking:

Tags

Tags are named by replacing the x in the Dockerfile version with a minor version number, and for fixed Drupal versions, by appending the Drupal version, for example:

  • 8.0.x-dev-1.0 to use the latest stable version of Drupal 8.0.x, whatever it is.
  • 8.0.x-dev-1.0-8.0.0-beta10 to use 8.0.0-beta10.

The tags are not guaranteed to keep up with the Drupal versions. Fork this project or submit a pull request if you want a more recent tag.

Example usage

See the Dockerfiles and scripts in Realistic Dummy Content.

Developers

I try to keep this project in sync with the alberto56/docker-drupal Docker repository. This means that if a tag exists here, you should be able to use it in your Dockerfile (see "Example usage", above), by typing, for example:

FROM alberto56/docker-drupal:7.x-dev-2.0

If Docker cannot find that tag, pleas submit a bug report with your exact output. If you want to fork this repository and maintain your own Docker repository, here is an example of how to do so for a specific tag.

Start by making sure you have an account on Docker.com; this will allow you to host your own repositories.

Replace 8.0.x-dev-1.0-8.0.0-beta10, c384f6f44b8c, alberto56, and [email protected] with whatever tag, image hash, username and email you are using:

$ git checkout 8.0.x-dev-1.0-8.0.0-beta10
...
$ docker build .
...
Successfully built c384f6f44b8c
$ docker tag c384f6f44b8c alberto56/docker-drupal:8.0.x-dev-1.0-8.0.0-beta10
$ docker push alberto56/docker-drupal
...
Please login prior to push:
Username: alberto56
Password:
Email: [email protected]

docker-drupal's People

Contributors

alberto56 avatar edouardpoitras avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-drupal's Issues

Site exception when logging in

When logging into a site on 8.0.x, there is a site exception, the watchdog says:

 32  11/May 06:01  php                 Drupal\Component\Plugin\Exception\Plugin 
                                   NotFoundException: The                   
                                   "environment_indicator" entity type does 
                                   not exist. in                            
                                   Drupal\Core\Entity\EntityManager->getDef 
                                   inition() (line 259 of /srv/dr           

Make Drupal root a git repo

It is possible that the application using a specific version of Drupal, say, 8.0.0-beta10, might want to upgrade. It is easier to upgrade to a specific commit if we are under git.

memory exhausted

When running moderately complex tests in the GUI we get something like:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7693546 bytes) in /srv/drupal/www/core/lib/Drupal/Component/Utility/SafeMarkup.php on line 94

We might want to add this to nginx.conf?

# see http://serverfault.com/questions/500143/nginx-php-fpm-how-to-specify-memory-limit-for-an-application
fastcgi_param PHP_VALUE "memory_limit = 128M"

Call to undefined function Drupal\simpletest\filter_default_format()

This is really simple test, which, when run on the command line, will cause the error:

namespace Drupal\mymodule\Tests;
use \Drupal\simpletest\WebTestBase;

/**
 * Test Realistic dummy content with a temporary database.
 *
 * @group mymodule
 */
class NameOfTest extends WebTestBase {
  public static $modules = array('mymodule');

  public function testCase() {
    $node = $this->drupalCreateNode();
  }

}

This might be related to https://www.drupal.org/node/2454513

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.