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

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 :)

Sergey Kibish

November 14, 2015
Tweet

More Decks by Sergey Kibish

Other Decks in Technology

Transcript

  1. TODAY I WILL TALK ABOUT What is Docker Why to

    use it for Development TODO application Q&A time
  2. DEVELOPMENT Consistent development environments env(dev) == env(prod) You only need

    Docker Different language versions without hacks Can use editor/IDE Normally
  3. “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.”
  4. 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
  5. 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"]