{"id":23043366,"url":"https://github.com/theodorosploumis/drupalcamp2016","last_synced_at":"2026-05-04T09:32:46.844Z","repository":{"id":151061742,"uuid":"61122645","full_name":"theodorosploumis/drupalcamp2016","owner":"theodorosploumis","description":"Using Drupal with Docker - DrupalCamp Athens, Greece 2016","archived":false,"fork":false,"pushed_at":"2017-10-12T20:35:57.000Z","size":2143,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-10-10T20:41:24.320Z","etag":null,"topics":["docker","docker-compose","drupal","drupalcamp2016"],"latest_commit_sha":null,"homepage":"http://theodorosploumis.github.io/drupalcamp2016/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theodorosploumis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-14T12:53:35.000Z","updated_at":"2016-11-02T02:20:09.000Z","dependencies_parsed_at":"2023-05-02T17:17:47.791Z","dependency_job_id":null,"html_url":"https://github.com/theodorosploumis/drupalcamp2016","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theodorosploumis/drupalcamp2016","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrupalcamp2016","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrupalcamp2016/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrupalcamp2016/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrupalcamp2016/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorosploumis","download_url":"https://codeload.github.com/theodorosploumis/drupalcamp2016/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorosploumis%2Fdrupalcamp2016/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32601529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","drupal","drupalcamp2016"],"created_at":"2024-12-15T20:47:19.635Z","updated_at":"2026-05-04T09:32:46.826Z","avatar_url":"https://github.com/theodorosploumis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker logo](https://raw.githubusercontent.com/theodorosploumis/drupalcamp2016/gh-pages/img/docker_logo.png)\n\n## Using Docker with Drupal - Introduction\n\n#### [DrupalCamp 2016](http://www.drupal-camp.gr), 1-3 July 2016\n\n###### [TheodorosPloumis.com](http://www.theodorosploumis.com/en) / [@theoploumis](http://twitter.com/theoploumis)\n________________________\n\n###### Get them: [online presentation](http://theodorosploumis.github.io/drupalcamp2016/) / [source code](https://github.com/theodorosploumis/drupalcamp2016) / [docker image](https://hub.docker.com/r/tplcom/drupalcamp2016/) / [Video](https://goo.gl/pb0eEm)\n\n###### Under [Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/) license.\n\n---\n\n### What is Docker\n\n\u003e Docker is an open platform for developing, shipping, and running applications.\n\n---\n\n### Docker History\n\n\n| When | Who | License | GH stars |\n| :---: | :---: | :---: | :---: |\n| 03/2013 | [Solomon Hykes](https://twitter.com/solomonstre) | Apache | [37k](https://github.com/docker/docker)|\n\n---\n\n### Docker Benefits\n\n - Fast (deployment, migration, restarts)\n - Secure\n - Lightweight (save disk \u0026 CPU)\n - Open Source\n - Portable software\n - Microservices and integrations (APIs)\n - Simplify DevOps\n - Version control capabilities\n\n---\n\n### Common Docker usages\n\n - Scaling apps\n - Development collaboration\n - Infrastructure configuration\n - Sandbox (develop, test, debug, educate etc)\n - Local development\n - Continuous Integration \u0026 Deployment\n - Multi-tier applications\n - PaaS, SaaS\n\n###### See the [survey results for 2016](https://www.docker.com/survey-2016)\n\n---\n\n### Technology stack\n\n - Linux [x86-64](https://www.wikiwand.com/en/X86-64) \u0026 Windows (Server 2016+)\n - [Go](https://golang.org/) language\n - [Client - Server](https://www.wikiwand.com/en/Client%E2%80%93server_model) (deamon) architecture\n - Union file systems ([UnionFS](https://www.wikiwand.com/en/UnionFS): AUFS, btrfs, vfs etc)\n - [Namespaces](https://en.wikipedia.org/wiki/Cgroups#NAMESPACE-ISOLATION) (pid, net, ipc, mnt, uts)\n - Control Groups ([cgroups](https://www.wikiwand.com/en/Cgroups))\n - Container format ([libcontainer](https://github.com/opencontainers/runc/tree/master/libcontainer \"Libcontainer provides a native Go implementation for creating containers with namespaces, cgroups, capabilities, and filesystem access controls. It allows you to manage the lifecycle of the container performing additional operations after the container is created.\"))\n\n###### See more at [Understanding docker](https://docs.docker.com/engine/understanding-docker/)\n\n---\n\n### Docker components\n\n - (Docker) client\n - daemon\n - engine\n - machine\n - compose\n - swarm\n - registry\n\n---\n\n### Docker client\n\nIt is the primary user interface to Docker. It accepts commands from the user\nand communicates back and forth with a Docker daemon.\n\n---\n\n### Docker daemon\n\nIt runs on a host machine. The user does not directly interact with the daemon,\nbut instead through the Docker client with the RESTful api or sockets.\n\n---\n\n### Docker engine\n\nA Client with a Daemon as also as the docker-compose tool. Usually referred simply as \"docker\".\n\n![Docker engine logo](https://raw.githubusercontent.com/theodorosploumis/docker-java/master/img/docker_logo_simple.png)\n\n---\n\n### Docker machine\n\nIt creates servers (locally, on cloud etc), installs Docker on them, then configures the Docker client to talk to them.\n\n![Docker machine logo](https://raw.githubusercontent.com/theodorosploumis/docker-presentation/gh-pages/img/docker_machine.png)\n\n---\n\n### Docker compose\n\nA tool for defining and running complex applications with Docker\n(eg a multi-container application) with a single file.\n\n![Docker compose logo](https://raw.githubusercontent.com/theodorosploumis/docker-presentation/gh-pages/img/docker_compose.png)\n\n---\n\n### Docker swarm\n\nSwarm pools together several Docker hosts and exposes them as a single virtual Docker host (cluster).\nIt scale up to multiple hosts.\n\n![Docker swarm logo](https://raw.githubusercontent.com/theodorosploumis/docker-presentation/gh-pages/img/docker_swarm.png)\n\n---\n\n### Docker distribution\n\nA (hosted) service containing repositories of images which responds to the Registry API.\n\n![Docker distribution logo](https://raw.githubusercontent.com/theodorosploumis/docker-presentation/gh-pages/img/docker_distribution.png)\n\n---\n\n### Steps of a Docker workflow\n\n```\ndocker run -i -t ubuntu:15.04 /bin/bash\n```\n\n - Pulls the ubuntu:15.04 [image](https://docs.docker.com/engine/userguide/containers/dockerimages/ \"A read-only layer that is the base of your container. It can have a parent image to abstract away the more basic filesystem snapshot.\") from the [registry](https://docs.docker.com/registry/ \"The central place where all publicly published images live. You can search it, upload your images there and when you pull a docker image, it comes the repository/hub.\")\n - Creates a new [container](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/ \"A runnable instance of the image, basically it is a process isolated by docker that runs on top of the filesystem that an image provides.\")\n - Allocates a filesystem and mounts a read-write [layer](https://docs.docker.com/engine/reference/glossary/#filesystem \"A set of read-only files to provision the system. Think of a layer as a read only snapshot of the filesystem.\")\n - Allocates a [network/bridge interface](https://www.wikiwand.com/en/Bridging_%28networking%29)\n - Sets up an [IP address](https://www.wikiwand.com/en/IP_address \"An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication.\")\n - Executes a process that you specify (``` /bin/bash ```)\n - Captures and provides application output\n\nScreencast: [Steps of a Docker workflow](https://asciinema.org/a/1yqyy1uu1taxciqf4136sy3ld).\n\n---\n\n### The Docker Components diagram\n\n![Docker components](https://raw.githubusercontent.com/theodorosploumis/docker-java/master/img/docker-components.png)\n\n---\n\n### The docker image\n\n![ubuntu:15.04 image](https://docs.docker.com/engine/userguide/storagedriver/images/image-layers.jpg \"A read-only layer that is the base of your container. It can have a parent image to abstract away the more basic filesystem snapshot. Each Docker image references a list of read-only layers that represent filesystem differences. Layers are stacked on top of each other to form a base for a container’s root filesystem.\")\n\n---\n\n### The docker container\n\n![container using ubuntu:15.04 image](https://docs.docker.com/engine/userguide/storagedriver/images/container-layers.jpg \"A runnable instance of the image, basically it is a process isolated by docker that runs on top of the filesystem that an image provides. For each containers there is a new, thin, writable layer - container layer - on top of the underlying stack (image).\")\n\n---\n\n### The Dockerfile\n\n\u003e A Dockerfile is a text document that contains all the commands a user could call on the command line to create an image.\n\n - [Dockerfile with inline comments](https://github.com/theodorosploumis/docker-presentation/blob/gh-pages/examples/dockerfile/Dockerfile) just for education\n - [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) on docker docs\n - Drupal* Dockerfiles ([Drupal](https://github.com/docker-library/official-images/blob/master/library/drupal), [drush/drush](https://github.com/RobLoach/drush-docker/blob/master/8/Dockerfile), [dropdog/docker](https://hub.docker.com/r/dropdog/docker/~/dockerfile/), [Boran/docker-drupal](https://github.com/Boran/docker-drupal/blob/master/Dockerfile), [ricardoamaro/docker-drupal](https://github.com/ricardoamaro/docker-drupal/blob/master/Dockerfile))\n\n---\n\n### Docker examples\n\n- SSH into a container\n- Common Docker commands\n- [Linked](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/) containers\n- Docker [Volume](https://docs.docker.com/engine/userguide/containers/dockervolumes/)\n- Using [docker-compose](https://docs.docker.com/compose/)\n- Advanced usage of docker-compose\n- Scale containers with docker-compose\n\n---\n\n### Example: SSH into a container\n\n```\ndocker pull ubuntu\ndocker run -it --name ubuntu_example ubuntu /bin/bash\n```\nScreencast: [SSH into a container](https://asciinema.org/a/0z4bu6ub4l3z6n3t6b0d5e35g)\n\n---\n\n### Example: Common Docker Commands\n\n```\n// General info\ndocker help // docker help run\ndocker info\ndocker version\ndocker network ls\n\n// Images\ndocker images // docker [IMAGE_NAME]\ndocker pull [IMAGE] //\ndocker push [IMAGE]\ndocker save [IMAGE] // commit, tag, export, load, rmi\n\n// Containers\ndocker run ...\ndocker ps // docker ps -a, docker ps -l\ndocker stop/start/restart [CONTAINER]\ndocker stats [CONTAINER]\ndocker top [CONTAINER]\ndocker port [CONTAINER]\ndocker inspect [CONTAINER]\ndocker inspect -f \"{{ .State.StartedAt }}\" [CONTAINER]\ndocker rm [CONTAINER]\n\n```\nScreencast: [Common Docker commands](https://asciinema.org/a/3hczjxzuvih674htyis6o8q6t)\n\n---\n\n### Example: Docker link containers\n\nLet's create a [Drupal app](https://hub.docker.com/_/drupal/) (apache, php, mysql, drupal)\n\n```\ndocker pull drupal:8.2.3-apache\ndocker pull mysql:8\n\n// Start a container for mysql\ndocker run --name mysql_example \\\n           -e MYSQL_ROOT_PASSWORD=root \\\n           -e MYSQL_DATABASE=drupal \\\n           -e MYSQL_USER=drupal \\\n           -e MYSQL_PASSWORD=drupal \\\n           -d mysql:8\n\n// Start a Drupal container and link it with mysql\n// Usage: --link [name or id]:alias\ndocker run -d --name drupal_example \\\n           -p 8280:80 \\\n           --link mysql_example:mysql \\\n           drupal:8.2.3-apache\n\n// Open http://localhost:8280 to continue with the installation\n// On the UI for the db host use: mysql\n\n// There is a proper linking\ndocker inspect -f \"{{ .HostConfig.Links }}\" drupal_example\n```\nScreencast: [Docker: Drupal and MySQL containers linked](https://asciinema.org/a/1bp6bb5tbq0hwuwgyck8ufo8j)\n\n---\n\n### Example: Docker volume\n\nLet's mount local files to a docker container\n\n```\ncd ~/drupalcamp2016\ndrush dl drupal-8.2.3\ncd ~/drupalcamp2016/drupal-8.2.3\n\n// Start a container for mysql\ndocker run --name mysql_container \\\n           -e MYSQL_ROOT_PASSWORD=root \\\n           -e MYSQL_DATABASE=drupal \\\n           -e MYSQL_USER=drupal \\\n           -e MYSQL_PASSWORD=drupal \\\n           -d mysql:8\n\n// Start drupal container with volume\n// Folder \"modules\" locally is mounted to the container\ndocker run -d --name drupal_with_mysql_volumed \\\n           -p 8290:80 \\\n           --link mysql_container:mysql \\\n           -v $(pwd)/modules:/var/www/html/modules \\\n           drupal:8.2.3-apache\n\n// Locally download devel module (assuming you have drush on host)\ndrush dl devel\n// Devel module is available on the container\n\n```\n\n---\n\n### Example: Using Docker Compose\n\nLet's create a Drupal app using [docker-compose.yml](https://github.com/theodorosploumis/drupalcamp2016/blob/gh-pages/examples/docker-compose/simple/docker-compose.yml)\n\n```\ngit clone git@github.com:theodorosploumis/drupalcamp2016.git \\\n          ~/drupalcamp2016/presentation\ncd ~/drupalcamp2016/presentation/examples/docker-compose/simple\n\n// Run docker-compose using the docker-compose.yml\ndocker-compose up -d\n```\nScreencast: [Docker compose simple example](https://asciinema.org/a/ewdsoyphlf29bpa5cvgx8d1k6)\n\n---\n\n### Example: More advanced docker-compose\n\n[Drupal + friends](https://github.com/theodorosploumis/drupal-docker) together.\n\n```\ncd ~/drupalcamp2016\ngit clone git@github.com:theodorosploumis/drupal-docker.git\ncd ~/drupalcamp2016/drupal-docker\n\ndocker-compose up -d\n\n// Open http://localhost:8082 (web)\n// Open http://localhost:8090 (phpmyadmin)\n\n// Prepare Drupal for installation\ndocker exec drupal_8082 bash /scripts/prepare-install.sh\n\n// Install with Drush\ndocker exec drupal_8082 drush \\\n    site-install -y standard \\\n    --site-name=\"Drupal 8 with Docker - Drush\" \\\n    --db-url=mysql://drupal:drupal@mysql/drupal \\\n    --site-mail=admin@example.com \\\n    --account-name=admin \\\n    --account-pass=admin \\\n    --account-mail=admin@example.com\n\n```\nScreencast: [Drupal \u0026 PhpMyAadmin, Drush, Console etc](https://asciinema.org/a/bmsaz1ltrnap179m62vjruot0)\n\n---\n\n### Example: Scale containers with docker-compose\n\n```\ncd ~/drupalcamp2016\ngit clone git@github.com:theodorosploumis/drupal-docker.git\ncd ~/drupalcamp2016/drupal-docker\n\ndocker-compose up -d\n// Continue as before and install Drupal with drush...\n\n// Scale the Drupal slave service\ndocker-compose scale drupal_slave=10\n\n// Show the new slave containers IP Addresses\ndocker exec drupaldocker_drupal_slave_1 hostname -I\n\n// Show the IP Address using Docker\ndocker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' \\\n               drupaldocker_drupal_slave_1\n...\n\n// Slaves share the same mysql and files\ndocker exec drupaldocker_drupal_slave_1 drush status\ndocker exec drupaldocker_drupal_slave_2 drush status\n...\n\n```\nScreencast: [Scale Drupal with docker-compose](https://asciinema.org/a/45e87mjaj4x3b2p4jirobii5n)\n\n---\n\n### Docker for Drupal recipes\n\nThe Drupal \"parts\"\n\n- server\n- code\n- database\n- public/private files\n- helper software (eg drush, composer etc)\n\n---\n\n### Docker for Drupal - Combinations and Options\n\n| A/a | Part | Docker options |\n|:---|:-----|:-----|\n|1| Server| Image |\n|2| Code | Image, Volumes, Inside 1 |\n|3| Files | None ([stage_file_proxy](https://www.drupal.org/project/stage_file_proxy)), Image, Inside 2 |\n|4| Database | Image, Inside 1 |\n|5| Helpers | Image, Inside 1, Volumes, None |\n\n---\n\n### From Monolithic apps\n\n![Monolithic Architecture](https://raw.githubusercontent.com/theodorosploumis/drupalcamp2016/gh-pages/img/monolithic.png)\n\n---\n\n### To Containerized apps\n\n![Containerized Architecture](https://raw.githubusercontent.com/theodorosploumis/drupalcamp2016/gh-pages/img/containerized.png)\n\n---\n\n### Docker tips\n\nThere are known best practices (see a list at [examples/tips](https://github.com/theodorosploumis/drupal-presentation/tree/gh-pages/examples/tips))\n\n- Optimize containers (see [imagelayers.io](https://imagelayers.io/?images=drupal:8.1.0-fpm))\n- Create your own, tiny base images\n- Containers are not Virtual Machines\n- Full stack Images VS 1 process per Container\n- Use files/scripts to setup container\n- Prefer using docker-compose\n- Production needs orchestration\n\n---\n\n### The Docker war\n\n| Type | Software |\n|:----|:----------|\n| Cluster \u0026 \u003cbr\u003eorchestrate | [Swarm](https://docs.docker.com/swarm/), [Kubernetes](http://kubernetes.io/), [Marathon](https://mesosphere.github.io/marathon/), [MaestroNG](https://github.com/signalfx/maestro-ng), [decking](http://decking.io/), [shipyard](http://shipyard-project.com/) |\n| Registry | [Portus](http://port.us.org/), [Docker Distribution](https://github.com/docker/distribution), [docker hub](http://hub.docker.com), [quay.io](https://quay.io), [Google Container Reg.](https://cloud.google.com/tools/container-registry/), [Artifactory](https://www.jfrog.com/artifactory/), [projectatomic.io](http://www.projectatomic.io/), [Treescale.com](https://treescale.com/), [Canister.io](https://www.canister.io/) |\n| PaaS | [Rancher](http://rancher.com/), [Tsuru](https://tsuru.io/), [dokku](https://github.com/dokku/dokku), [flynn](https://flynn.io/),  [Octohost](http://octohost.io/) |\n\n---\n\n### Docker alternatives\n\n- [Rocket, rkt](https://github.com/coreos/rkt)\n- [Linux Containers, LXC](https://linuxcontainers.org/)\n- [OpenVZ](https://openvz.org/)\n- [BSD Jails](https://www.freebsd.org/doc/handbook/jails.html)\n- [Solaris Zones](http://oracle.com/solaris)\n- [drawbridge](http://research.microsoft.com/en-us/projects/drawbridge/)\n\n---\n\n### Instead of Resources\n\n - [docs.docker.com](https://docs.docker.com/)\n - Books: [Docker in Practice](https://www.manning.com/books/docker-in-practice), [The Docker Book](http://www.dockerbook.com/)\n - Tools: [terra](http://terra.readthedocs.io/) / [docksal](http://docksal.io/) / [dropdock](http://dropdock.io/), [kalabox](https://github.com/kalabox/kalabox) / [bowline](https://github.com/davenuman/bowline) / [Docker4Drupal](https://github.com/wodby/docker4drupal) / [DruDock](https://github.com/4AllDigital/DruDockCli) / [drocker](https://github.com/gabesullice/drocker)\n - Community: [Dockerized Drupal](https://dockerizedrupal.com) / [D.O. Docker group](https://groups.drupal.org/docker) / [D.O. drupalci_testbot](https://www.drupal.org/project/drupalci_testbot)\n\n---\n\n### Questions?\n\n![Drupal over Docker!](https://raw.githubusercontent.com/theodorosploumis/drupalcamp2016/gh-pages/img/dcamp_docker.png)\n\n$this-\u003esend('[feedback](https://goo.gl/xa3moy)');\n______________\n\n###### Tools used: [docker 1.12.3](https://github.com/docker/docker/releases/tag/v1.12.3) / [docker compose 1.9.0](https://github.com/docker/compose/releases/tag/1.9.0) / [asciinema](https://asciinema.org) / [oh my zsh](http://ohmyz.sh/) / [reveal.js](https://github.com/hakimel/reveal.js) /\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Fdrupalcamp2016","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorosploumis%2Fdrupalcamp2016","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorosploumis%2Fdrupalcamp2016/lists"}