![]() ![]() VOLUME /var/www/htmlĪs I've mentioned earlier, I aim to reuse existing solutions where possible so where better to start than to use the official Docker images for Drupal. RUN sed -i 's/DocumentRoot /var/www/html/DocumentRoot /var/www/html/web/g' /etc/apache2/sites -available/000 nf # Make a minor adjustment to the DocumentRoot so that it points to where our application codes are. # Install Composer RUN curl -sS https :///installer | php -install -dir=/usr/local/bin -filename=composer RUN apt -get update & apt -get install -y mariadb -client git # Install MySQL client so we can use drush from inside the container, among other things. Drupal imageįor this setup, we'll only need one Dockerfile, which will be used to build the main image for our Drupal container. ![]() It also comes with sensible default packages, structure, and tools, such as drush and Drupal console. The template provides a starter kit for managing your site dependencies with Composer. This setup assumes that the Composer template for Drupal will be used. If you prefer to jump into the code, check out an example Drupal project I created that uses this approach. In doing so, I hope to provide a simple starting point for myself, and hopefully others as well, to build future projects on. The idea is to reuse and extend existing solutions while having minimal custom code as much as possible. I found a lot of great examples on how to leverage Docker for Drupal development, some of which I've used personally, so much so that I've decided to try and come up with the simplest and most straightforward setup I can. It lets you, and other developers, easily and consistently setup a local development environment anytime without the hassle of going through multiple steps and documentation, and most of all, provides a high degree of Environment Parity. Using Docker as part of your development environment is a smart and progressive move.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |