$30 off During Our Annual Pro Sale. View Details »

Docker in Practice

Carlos Souza
December 14, 2016

Docker in Practice

This talk covers some of the problems we face when working with non-trivial architectures and how Docker can help.

Carlos Souza

December 14, 2016
Tweet

More Decks by Carlos Souza

Other Decks in Technology

Transcript

  1. Docker in Practice Using Linux containers to run non-trivial architectures.

    Carlos Souza github.com/caike twitter.com/caike
  2. Efficient Developers Quickly write and deploy applications to solve problems.

    Docker in Practice 1,000,000 things could go wrong 1,000,000 things
 will go wrong
  3. Docker in Practice The Problem In Development: • Install language

    • Install dependencies • Install database • Link everything up
  4. Docker in Practice The Problem In Development: • Install language

    • Install dependencies • Install database • Link everything up • Mess everything up and start again
  5. In Production: The Problem • Install language • Install dependencies

    • Install database • Install web server • Link everything up
  6. In Production: The Problem • Install language • Install dependencies

    • Install database • Install web server • Link everything up • Mess everything up and spend time fixing it
  7. Development == Production Web Server App Server DB Server App

    Server Web Server App Server DB Server App Server
  8. Docker in Practice Solution #1 - All In One Nginx

    NodeJS NodeJS MongoDB Linux OS process process process process • Single OS • Multiple Processes • No Isolation
  9. Docker in Practice Solution #2 - Virtual Machines Nginx VM

    OS VM OS VM OS VM OS Host Linux OS process process process process • Single Host OS • Multiple VM OS • Isolated Processes • Resource Intensive
  10. Docker in Practice Solution #3 - Linux Containers Nginx NodeJS

    NodeJS MongoDB Linux OS container container container container process process process process • Single OS (shared kernel) • Multiple Containers • Isolated Processes • Low overheard
  11. Docker in Practice Container Architecture Nginx NodeJS NodeJS MongoDB Linux

    OS (Docker host) • Separate applications from infrastructure • Shorten the cycle between writing code and running code
  12. Docker in Practice Ansible Nginx NodeJS NodeJS MongoDB Production Linux

    OS 
 (Docker host) • Installs Docker • Fetches Docker images • Uploads source code • runs `docker-compose up` • (build images and run processes) Running On The Server:
  13. Next Steps: Automate All The Things • Use Dockerhub •

    Use Github • Multi-Container Logging • Docker Swarm / Kubernetes