![]() ![]() One of the many benefits of this is that it ensures each team member is developing in the same environment. One of the great advantages of virtualization, be it Docker or a full VM, is that you don’t have to rely on installing global dependencies on your local machine. While we could install these applications on the host machine, outside of the Docker image, that defeats the purpose of using Docker. Node and npm are required for managing the theme’s node dependencies (such as Gulp, Bower, etc.), while PHP and Composer are required by the theme to run and serve Pattern Lab. Running the Phase 2 Pattern Lab Starter theme requires Node.js, the node package manager npm, PHP, and the PHP dependency manager Composer. ![]() We then copied the Pattern Lab Starter code to a new custom/theme/patter_lab_starter directory in our Drupal project. To experiment with the Pattern Lab Starter theme we began with a vanilla Drupal 8 installation, and then quickly spun up our local Docker development environment using Docker4Drupal. Oh, the beauty of open source! Building the Docker image So when we heard of the Pattern Lab Starter Drupal theme which leverages Pattern Lab (a tool for building pattern-driven user interfaces using atomic design), we were excited to bake the front-end components in to our Docker world. Real interaction with the design is necessary from the get-go gone are the days of the static Photoshop file at the outset that “magically” translates to a living design at the end. We’re also fans of the atomic design methodology and present our clients interactive style guides early to facilitate better collaboration throughout. In these cases we’ve relied on Wodby’s Docker4Drupal project, which is “a set of docker containers optimized for Drupal.” ![]() However, for agile development and rapid prototyping, we often make use of public Docker images. Usually we build our Docker images from scratch to closely match production environments. In the past we used Vagrant and virtual machines, even a Drupal-specific flavor DrupalVM, for these purposes, but we’ve found Docker to be faster when switching between multiple projects, which we often do on any given Sunworkday. Using Docker makes it easy for developers to quickly spin up consistent local development environments that match production. We switched to using Docker for local development last year and we love it - so much so that we even proposed a Drupalcon session on our approach and experience we hope to deliver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |