Pro Yearly is on sale from $80 to $50! »

Docker 101 Rubyist Edition

Docker 101 Rubyist Edition

Cd2e3ba306d19910a2900955667317ee?s=128

David Anguita

January 29, 2016
Tweet

Transcript

  1. DOCKER 101 David Anguita <3 CiudadReal.rb

  2. Hi, I'm @danguita

  3. Let's talk about software containers

  4. "It works on my machine"

  5. Provides a widely adopted and easy-to-use interface to lightweight Linux

    Containers Why Docker?
  6. Virtual Machine model vs Docker Engine model Why Docker? Source:

    http://docker.com
  7. Minimal overhead

  8. Daemon • Manages containers • Exposes a REST-ish API Client

    $ docker ps $ docker images $ docker run ... Docker Engine Docker Machine
  9. Image vs Container $ docker images $ docker build $

    docker pull $ docker push $ docker commit $ docker rmi $ docker ps $ docker run $ docker start $ docker stop $ docker rm Immutable, snapshot of a container Running instance of an image Docker Registry
  10. MY FIRST CONTAINER

  11. Gluing things together

  12. Docker Compose $ docker-compose up $ docker-compose ps web $

    docker-compose logs web $ docker-compose scale web=5 ... • Multi-container set up • Wraps Docker CLI • Image building • Links • Volumes • Ports • Scaling
  13. api: image: ... command: ... environment: ... volumes: ... links:

    ... ports: ... frontend: ... sidekiq: ... postgres: ... elasticsearch: ... memcached: ... redis: ... haproxy: ... docker-compose.yml
  14. MOAR CONTAINERS!

  15. Real-world advantages • Easy Continuous Integration / Delivery • Consistency

    across environments • Portability • Isolated scalability • Rapid deployment • Instant (micro-)service oriented architecture • Clustering
  16. Legos for cloud computing

  17. • Docker Swarm • Kubernetes Clustering Tooling Platforms • Amazon

    EC2 Container service • Google Container Engine
  18. This is just the beginning

  19. Thank you

  20. Q&A

  21. CiudadReal.rb, January 2016