Docker in da house

Docker in da house

Have you ever thought about minimalistic workspace? Without spending hours to install all needed things for successful development? You want to develop in "close to production" environment locally? And share this environment with other team members easily? You know what? It's easy to do, especially when Docker comes in the house!

I will tell you a little what is Docker, how you can easily spin up NGINX + PHP + Database + Whatever (e.g. node, gulp, bower, ruby+sass, etc.) without installing ANY of these on your host system. Good practices, examples of real life use cases. All this accompanied with a live demo. Join the dark side, we have Docker :)

A9e23925dc5753d5925cb6ef55d71765?s=128

Sergey Kibish

November 14, 2015
Tweet

Transcript

  1. WHOAMI Sergey Kibish Full Stack Web Dev @ Transact Pro

    Simplicity is a key ♥ Music
  2. DOCKER IN DA HOUSE DEVELOPMENT ENVIRONMENT REIMAGINED By / Sergey

    Kibish @s_kibish
  3. TODAY I WILL TALK ABOUT What is Docker Why to

    use it for Development TODO application Q&A time
  4. DOCKER

  5. BACKGROUND Linux containers introduced in 2008 Problem with common OS

    kernel is solved
  6. CONS Lightweight Open Secure

  7. None
  8. DEVELOPMENT Consistent development environments env(dev) == env(prod) You only need

    Docker Different language versions without hacks Can use editor/IDE Normally
  9. EASY

  10. INSTALLATION

  11. INSTALLATION $ apt-get install docker-engine

  12. DOCKER COMPOSE

  13. “Compose is a tool for defining and running multi-container applications

    with Docker. With Compose, you define a multi- container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.”
  14. NOT BAD

  15. DOCKER-COMPOSE.YML web: image: nginx:latest ports: - 80:80 volumes: - .:/var/www/html

    - ./config/vhost.conf:/etc/nginx/conf.d/vhost.conf links: - php php: build: ./config/php volumes: - .:/var/www/html - ./config/php-fpm.conf:/etc/php5/fpm/php-fpm.conf links: - db db: image: mysql:latest ports: - 3306:3306 environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=todo
  16. DEMO TIME!

  17. None
  18. WHY?

  19. COMPOSER $ docker pull composer/composer

  20. BACK TO DEMO

  21. DOCKERFILE FROM php:5.6-fpm RUN apt-get update && apt-get install -y

    \ libmcrypt-dev \ libpq-dev \ && docker-php-ext-install mcrypt mbstring \ && docker-php-ext-install mysqli pdo pdo_mysql tokenizer EXPOSE 9000 CMD ["php-fpm"]
  22. LAYERS

  23. None
  24. BONUS Queue Worker Generator

  25. DO WE USE IT?

  26. None
  27. HOW 20+microservices Spinning on all team member machines MySQL, Redis,

    Queues, different languages
  28. None
  29. None
  30. None
  31. CONTACTS  @s_kibish  skibish  +SergeyKibish