Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Drupal on Docker

Drupal on Docker

In this talk, I highlighted the most important features of Docker and demonstrated how you can use it to create an amazingly efficient environment for Drupal development.

Jochen Lillich

May 23, 2015
Tweet

More Decks by Jochen Lillich

Other Decks in Programming

Transcript

  1. "Docker is an open platform for developers and sysadmins to

    build, ship, and run distributed applications.” © 2015 freistil IT Ltd
  2. Container • Runtime environment for a process • Package <

    Docker image < VM • Isolation instead of virtualisation © 2015 freistil IT Ltd
  3. Volumes • files persist on the host • same lifetime

    as container • can be shared between containers © 2015 freistil IT Ltd
  4. Use cases • Application container • Service container • Testing

    environment • Maintenance tools • Development environment © 2015 freistil IT Ltd
  5. Example Dockerfile Install packages RUN apt-get update && \ apt-get

    -y install \ apache2 \ && apt-get clean && \ rm -rf /var/lib/apt/lists/* © 2015 freistil IT Ltd
  6. Example Dockerfile Prepare runtime environment RUN mkdir -p /var/run/apache2 RUN

    echo "ServerName localhost" \ >>/etc/apache2/apache2.conf RUN sed -i -e 's/^ErrorLog .*/ErrorLog \/dev\/stdout/' \ /etc/apache2/apache2.conf © 2015 freistil IT Ltd
  7. Example Dockerfile Set environment variables ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP

    www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/run/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid © 2015 freistil IT Ltd
  8. Where to go from here • Compose • Swarm •

    Weave, Flannel • Flocker • CoreOS, Deis • Kubernetes © 2015 freistil IT Ltd