Slide 1

Slide 1 text

Drupal on Docker © 2015 freistil IT Ltd

Slide 2

Slide 2 text

Jochen Lillich @geewiz CEO freistil IT © 2015 freistil IT Ltd

Slide 3

Slide 3 text

Managed Hosting Platform freistilbox.com @freistilbox © 2015 freistil IT Ltd

Slide 4

Slide 4 text

"Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.” © 2015 freistil IT Ltd

Slide 5

Slide 5 text

Container • Runtime environment for a process • Package < Docker image < VM • Isolation instead of virtualisation © 2015 freistil IT Ltd

Slide 6

Slide 6 text

Images • Build from Dockerfile • Alternative build tools like Packer © 2015 freistil IT Ltd

Slide 7

Slide 7 text

Union file system © 2015 freistil IT Ltd

Slide 8

Slide 8 text

Deduplication © 2015 freistil IT Ltd

Slide 9

Slide 9 text

Volumes • files persist on the host • same lifetime as container • can be shared between containers © 2015 freistil IT Ltd

Slide 10

Slide 10 text

Use cases • Application container • Service container • Testing environment • Maintenance tools • Development environment © 2015 freistil IT Ltd

Slide 11

Slide 11 text

Docker for DevOps © 2015 freistil IT Ltd

Slide 12

Slide 12 text

© 2015 freistil IT Ltd

Slide 13

Slide 13 text

Example Dockerfile Preamble FROM ubuntu:trusty MAINTAINER Jochen Lillich © 2015 freistil IT Ltd

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

Example Dockerfile Connect to the outside world VOLUME /var/www/html EXPOSE 80 © 2015 freistil IT Ltd

Slide 18

Slide 18 text

Example Dockerfile Start the service CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"] © 2015 freistil IT Ltd

Slide 19

Slide 19 text

Demo time! © 2015 freistil IT Ltd

Slide 20

Slide 20 text

Docker for Drupal • LAMP • Drupal code • Application setup © 2015 freistil IT Ltd

Slide 21

Slide 21 text

But what about "single service?" © 2015 freistil IT Ltd

Slide 22

Slide 22 text

Demo time! Again! © 2015 freistil IT Ltd

Slide 23

Slide 23 text

Dockerfiles • https://github.com/freistil/freistil-docker-lamp • https://github.com/freistil/freistil-docker-drupal © 2015 freistil IT Ltd

Slide 24

Slide 24 text

Where to go from here • Compose • Swarm • Weave, Flannel • Flocker • CoreOS, Deis • Kubernetes © 2015 freistil IT Ltd

Slide 25

Slide 25 text

Thank you! [email protected] © 2015 freistil IT Ltd