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

Docker 101 Rubyist Edition

Docker 101 Rubyist Edition

David Anguita

January 29, 2016
Tweet

More Decks by David Anguita

Other Decks in Technology

Transcript

  1. DOCKER 101
    David Anguita <3 CiudadReal.rb

    View Slide

  2. Hi, I'm @danguita

    View Slide

  3. Let's talk about software containers

    View Slide

  4. "It works on my machine"

    View Slide

  5. Provides a widely adopted and easy-to-use
    interface to lightweight Linux Containers
    Why Docker?

    View Slide

  6. Virtual Machine model vs Docker Engine model
    Why Docker?
    Source: http://docker.com

    View Slide

  7. Minimal overhead

    View Slide

  8. Daemon

    Manages containers

    Exposes a REST-ish API
    Client
    $ docker ps
    $ docker images
    $ docker run
    ...
    Docker Engine
    Docker Machine

    View Slide

  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

    View Slide

  10. MY FIRST CONTAINER

    View Slide

  11. Gluing things together

    View Slide

  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

    View Slide

  13. api:
    image: ...
    command: ...
    environment: ...
    volumes: ...
    links: ...
    ports: ...
    frontend: ...
    sidekiq: ...
    postgres: ...
    elasticsearch: ...
    memcached: ...
    redis: ...
    haproxy: ...
    docker-compose.yml

    View Slide

  14. MOAR CONTAINERS!

    View Slide

  15. Real-world advantages

    Easy Continuous Integration / Delivery

    Consistency across environments

    Portability

    Isolated scalability

    Rapid deployment

    Instant (micro-)service oriented architecture

    Clustering

    View Slide

  16. Legos for cloud computing

    View Slide


  17. Docker Swarm

    Kubernetes
    Clustering
    Tooling
    Platforms

    Amazon EC2 Container service

    Google Container Engine

    View Slide

  18. This is just the beginning

    View Slide

  19. Thank you

    View Slide

  20. Q&A

    View Slide

  21. CiudadReal.rb, January 2016

    View Slide