Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Jan Burkl
Solution Consultant
Zend, a Rogue Wave Company
jan@zend.com // @5square_de
jan.burkl@roguewave.com
Developer's Dream
https://www.justwatch.com/de/Film/Der-Flug-des-Navigators
1. Get Code
2. Get Dependencies
3. Start the Engines

Fast Forward
Zend Expressive
(+ a little JS)
What has happened?
http://www.gamona.de/kino-dvd/deadpool-2,autoren-auch-das-sequel-benoetigt-kein-hohes-budget:news.html
particulum-mobile
https://bitbucket.org/account/user/janatzendteam/projects/PAR
My example project
What do I need?
Docker ≠ VirtualBox
One Daemon
=
One Container
"In almost all cases, you should
only run a single process in a single
container. Decoupling applications
into multiple containers makes it
much easier to scale horizontally
and reuse containers."

https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
Docker Compose
"Compose is a tool for defining and
running multi-container Docker applications."
Challenge
http://www.foxmovies.com/movies/kingsman-the-secret-service
docker run -d -i -t -p 80:80 -p \
3000:3000 -p 3001:3001 -p \
2222:22 --name gsd alankent/gsd

docker run -it --rm --name my-running-script \
-v "$PWD":/usr/src/myapp \
-w /usr/src/myapp php:7.0-cli \
php your-script.php

Andy Weir, The Martian
Duct tape works anywhere.
Duct tape is magic and
should be worshipped.

http://the-martian-movie.tumblr.com/post/128648842093/duct-tape-here-duct-tape-there-engineering-on
docker-compose.yml
docker-compose-setup.yml
(.env)
https://bitbucket.org/janatzendteam/particulum-mobile-master/src
docker-compose:
helps me defining (dev) infrastructure
Makefile
https://bitbucket.org/janatzendteam/particulum-mobile-master/src/master/Makefile
http://90to5.org/5MM/2015/ferris-buellers-day-off-1986/
make:
helps me controlling the infrastructure
Important Commands:
  • make start
  • make up
  • make down
  • make clean
  • make build-dev
Docker Image - (pull or) build
http://www.theatlantic.com/technology/archive/2013/10/how-realistic-is-the-movie-em-gravity-em/280211/
  • Docker Hub
  • Private Docker Repository
  • Local Dockerfile
  • Remote Dockerfile
FAIL
  • Missing Best Practices
  • Docker Updates
  • Docker Compose Updates
  • Permissions
  • Persistent Data
Permissions?
What's the problem?

  • webserver writes files
  • write access for www-data
  • www-data not available on host
  • use uid and gid of local user (#)

Database
or
Where to store my persistent Data?
  • Volumes
  • map local dir to /var/lib/mysql

mysql:
  image: mysql:5.6
  volumes:
    # mda = mysql_data_archive
    - ./mda:/mda
  environment:
    MYSQL_PASS: admin
  command: bash -c "cd / \
    && tar xvf /mda/backup.tar \
    && /run.sh"
Benefits
  • no huge files to handle
  • exchange images
  • every step is documented
  • no less networing issues
Danke schön
jan.burkl@roguewave.com
@5square_de
https://bitbucket.org/account/user/janatzendteam/projects/PAR
http://5square.de/talks/