O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Docker compose

506 visualizações

Publicada em

Docker Compose

Publicada em: Tecnologia
  • Seja o primeiro a comentar

Docker compose

  1. 1. DOCKER COMPOSE Felipe Ruhland @ Python Floripa
  2. 2. DOCKER ABOUT
  3. 3. ABOUT DOCKER written in golang
  4. 4. ABOUT DOCKER open-source project
  5. 5. DOCKER developers and sysadmins ABOUT
  6. 6. DOCKER develop, ship, and run ABOUT
  7. 7. DOCKER production as fast as possible ABOUT
  8. 8. history
  9. 9. Solomon Hykes history
  10. 10. history
  11. 11. history main contributors
  12. 12. JAN $15 million (Venture Capital) JUL Docker acquired Orchard (Fig) 2014 SEP $40 million (Sequoia Capital) OCT Microsoft announced integration (2016)
  13. 13. DOCKER WHY
  14. 14. LIGHTWEIGHT OPEN SECURE
  15. 15. - Faster delivery of your applications - Deploy and scale more easily - Get higher density and run more workloads - Faster deployment makes for easier management WHY DOCKER
  16. 16. CONTAINER VMvs
  17. 17. CONTAINERVM
  18. 18. WORKS HOW IT
  19. 19. HOW IT WORKS - libcontainer (libvirt, LXC, systemd-nspawn) - cgroups - namespaces - images distribution
  20. 20. COMPOSE DOCKER
  21. 21. DOCKER COMPOSE
  22. 22. - Tool for defining and running multi-container applications - Single file configuration - Great for development environments, staging servers, and CI - Written in python - We don’t recommend that you use it in production yet. DOCKER COMPOSE
  23. 23. - Binding to different ports on the host - Setting environment variables differently - Specifying a restart policy - Adding extra services BUT !
  24. 24. #1 define environment with Dockerfile
  25. 25. #2 define services with docker- compose.yml
  26. 26. #3 docker- compose up
  27. 27. dockerfile FROM python:2.7 ADD . /code WORKDIR /code RUN pip install -r requirements.txt CMD python app.py
  28. 28. docker-compose.yml web: build: . ports: - "5000:5000" volumes: - .:/code links: - redis redis: image: redis
  29. 29. docker-compose up $ docker-compose up Pulling image redis... Building web... Starting composetest_redis_1... Starting composetest_web_1... redis_1 | [8] 02 Jan 18:43:35.576 # Server started, Redis version 2.8.3 web_1 | * Running on http://0.0.0.0:5000/
  30. 30. docker compose cli commands build logs run scale up
  31. 31. github.com/feliperuhland feliperuhland.com @feliperuhland THANK YOU

×