SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Docker
ao vivo e a cores
Pedro Arthur P. R. Duarte
pedroarthur.jedi@gmail.com
"Na minha máquina
funciona!"
– você?
2
Como assim containers?
3
Implantação de Aplicações
https://www.datadoghq.com/blog/the-docker-monitoring-problem/
4
E por que só agora?
https://en.wikipedia.org/wiki/Docker_(software)
5
Imagens de Software
https://delftswa.github.io/chapters/docker/
6
Principais engines de tempo de execução
http://docker.com/ http://coreos.com/rkt/
7
Execução de Processos em Containers
https://coreos.com/rkt/docs/latest/rkt-vs-other-projects.html
8
Ao vivo!
9
Baixando e executando containers
r2@d2 $ docker pull debian:jessie
jessie: Pulling from library/debian
386a066cd84a: Pull complete
Digest: sha256:c1ce85a0f7126a3b5cbf7c57676b01b37c755b9ff9e2f39ca88181c02b985724
Status: Downloaded newer image for debian:jessie
r1@d2 $ docker run -it debian:jessie /bin/bash
root@c0c4c014d3af:/# ping 4.2.2.2
PING 4.2.2.2 (4.2.2.2): 56 data bytes
64 bytes from 4.2.2.2: icmp_seq=0 ttl=53 time=109.191 ms
--- 4.2.2.2 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 109.191/109.191/109.191/0.000 ms
root@c0c4c014d3af:/# exit 0
r1@d2 $ docker run -t debian:jessie ping -c 1 4.2.2.2
# mostly the same as the previous command
10
Construindo um Container: aplicação
Servidor de Echo
#!/ usr/bin/env python
from twisted.internet.protocol import Protocol , Factory
from twisted.internet import reactor
from twisted.python import log
from sys import stdout
class Echo(Protocol ):
def dataReceived (self , data ):
log.msg("Received", data)
self.transport.write(data)
log. startLogging (stdout)
log.msg("Echo server is starting")
reactor.listenTCP (8000 , Factory. forProtocol (Echo ))
reactor.run ()
11
Construindo um Container: Dockerfile
Arquivo de Descrição do Container
FROM debian:jessie
RUN apt -get update 
&& apt -get install -y python -twisted 
&& apt -get clean
COPY echo_server .py /usr/local/bin
EXPOSE 8000
CMD exec /usr/local/bin/ echo_server .py
12
Construindo um Container: build
r2@d2 $ docker build -t poticon_echo_server:1.0 .
Sending build context to Docker daemon 5.12 kB
Step 1 : FROM debian:jessie
---> 73e72bf822ca
Step 2 : RUN apt-get update && apt-get install -y python-twisted && apt
---> Running in e37b92a3c12b
# a lot of apt-get-related output
---> 6fbd3015ca0c
Removing intermediate container e37b92a3c12b
Step 3 : COPY echo_server.py /usr/local/bin
---> 87add3168ac0
Removing intermediate container 956612405c96
Step 4 : EXPOSE 8000
---> Running in 810fee23449d
---> 70890ad7e011
Removing intermediate container 810fee23449d
Step 5 : CMD exec /usr/local/bin/echo_server.py
---> Running in 65fd3384e5eb
---> 1b46b966c54e
Removing intermediate container 65fd3384e5eb
Successfully built 1b46b966c54e
Executando e Testando nosso container
r2@d2 $ docker run -t --net=host poticon_echo_server:1.0
2016-11-24 12:53:19+0000 [-] Log opened.
2016-11-24 12:53:19+0000 [-] Echo server is starting
2016-11-24 12:53:19+0000 [-] Factory starting on 8000
2016-11-24 12:53:19+0000 [-] Starting factory <twisted.internet.protocol.Factory in
2016-11-24 12:53:28+0000 [Echo,0,127.0.0.1] Received Hi, there!
# at another terminal; ts comes from moreutils
r2@d2 $ nc 127.0.0.1 8000 | ts ’%F %T’
Hi, there!
2016-11-24 12:53:28 Hi, there!
14
Composição de Serviços
r2@d2 $ cat docker-compose.yaml
version: ’2’
services:
redis:
image: redis
postgresql:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=$PG_PASSWORD
r2@d2 $ export PG_PASSWORD=p0t1c0n
r2@d2 $ docker-compose up -d # -d puts them in background
r2@d2 $ docker-compose logs # use -f to follow
r2@d2 $ docker-compose down # mind other commands such as stop and start
15
Por onde continuar?
16
Docker para Desenvolvedores
https://leanpub.com/dockerparadesenvolvedores
17
Links Úteis
Tecnologias de Containers:
– Docker: http://github.com/docker/
– Rkt: http://coreos.com/rkt
Orquestradores de Containers
– CoreOS: http://coreos.com
– Kubernetes: http://github.com/kubernetes
– Swarm: http://docker.com/swarm
18

Weitere ähnliche Inhalte

Was ist angesagt?

nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry managerToshiaki Baba
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertorToshiaki Baba
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioUilian Ries
 
Docker deploy
Docker deployDocker deploy
Docker deployEric Ahn
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeSoshi Nemoto
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Develcz
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hypebridgetkromhout
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottleJordi Soucheiron
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package ManagerUilian Ries
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLandJohan Janssen
 
Simple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottleSimple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottleJordi Soucheiron
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCapWilliam Lee
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerousDavid Tan
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 

Was ist angesagt? (20)

nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.io
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Lviv 2013 d7 vs d8
Lviv 2013   d7 vs d8Lviv 2013   d7 vs d8
Lviv 2013 d7 vs d8
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLand
 
Simple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottleSimple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottle
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerous
 
Dev ops
Dev opsDev ops
Dev ops
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 

Andere mochten auch

Cpgp day02 session 7 - cp-costing of wastes
Cpgp day02 session 7 - cp-costing of wastesCpgp day02 session 7 - cp-costing of wastes
Cpgp day02 session 7 - cp-costing of wasteszubeditufail
 
NEW ROOTS FINAL COLOR FILE
NEW ROOTS FINAL COLOR FILENEW ROOTS FINAL COLOR FILE
NEW ROOTS FINAL COLOR FILEAlissa Anderson
 
Blogging & e Portfolios PD by Jocelyn Sutherland
Blogging & e Portfolios PD by Jocelyn SutherlandBlogging & e Portfolios PD by Jocelyn Sutherland
Blogging & e Portfolios PD by Jocelyn Sutherlandjocelyns
 
Analizando mi evolución nancy
Analizando mi evolución nancyAnalizando mi evolución nancy
Analizando mi evolución nancyProfepatycaicedo
 
Environmental Impact Assessment FROM CHAKDARA TO MADYAN
Environmental Impact Assessment FROM CHAKDARA TO MADYANEnvironmental Impact Assessment FROM CHAKDARA TO MADYAN
Environmental Impact Assessment FROM CHAKDARA TO MADYANzubeditufail
 
[#openIQUII - Workshop] Personal e Executive Branding
[#openIQUII - Workshop] Personal e Executive Branding[#openIQUII - Workshop] Personal e Executive Branding
[#openIQUII - Workshop] Personal e Executive BrandingIQUII
 
ラルフローレン塗料とクーポンコードで
ラルフローレン塗料とクーポンコードでラルフローレン塗料とクーポンコードで
ラルフローレン塗料とクーポンコードでcanlie489
 
Taz art01 f_sn_p_e
Taz art01 f_sn_p_eTaz art01 f_sn_p_e
Taz art01 f_sn_p_ezubeditufail
 
Environment quotes, green sayings, ecology, conservation, pollution, etc
Environment quotes, green sayings, ecology, conservation, pollution, etcEnvironment quotes, green sayings, ecology, conservation, pollution, etc
Environment quotes, green sayings, ecology, conservation, pollution, etczubeditufail
 
Fundamental of computer
Fundamental of computerFundamental of computer
Fundamental of computerOnline
 
Aa resume frank pullizzi new one 10 18-16
Aa resume frank pullizzi  new one  10 18-16Aa resume frank pullizzi  new one  10 18-16
Aa resume frank pullizzi new one 10 18-16Frank Pullizzi
 
Blogging & e portfolios PD by Jocelyn Sutherland
Blogging & e portfolios PD by Jocelyn SutherlandBlogging & e portfolios PD by Jocelyn Sutherland
Blogging & e portfolios PD by Jocelyn Sutherlandjocelyns
 

Andere mochten auch (19)

Cpgp day02 session 7 - cp-costing of wastes
Cpgp day02 session 7 - cp-costing of wastesCpgp day02 session 7 - cp-costing of wastes
Cpgp day02 session 7 - cp-costing of wastes
 
amplifire2
amplifire2amplifire2
amplifire2
 
amplifire
amplifireamplifire
amplifire
 
Benito lertxundi. ;)
Benito lertxundi. ;)Benito lertxundi. ;)
Benito lertxundi. ;)
 
NEW ROOTS FINAL COLOR FILE
NEW ROOTS FINAL COLOR FILENEW ROOTS FINAL COLOR FILE
NEW ROOTS FINAL COLOR FILE
 
P&P PMO - Folha Informativa
P&P PMO - Folha Informativa P&P PMO - Folha Informativa
P&P PMO - Folha Informativa
 
Blogging & e Portfolios PD by Jocelyn Sutherland
Blogging & e Portfolios PD by Jocelyn SutherlandBlogging & e Portfolios PD by Jocelyn Sutherland
Blogging & e Portfolios PD by Jocelyn Sutherland
 
Izengabea 1
Izengabea 1Izengabea 1
Izengabea 1
 
Analizando mi evolución nancy
Analizando mi evolución nancyAnalizando mi evolución nancy
Analizando mi evolución nancy
 
Documento
DocumentoDocumento
Documento
 
Environmental Impact Assessment FROM CHAKDARA TO MADYAN
Environmental Impact Assessment FROM CHAKDARA TO MADYANEnvironmental Impact Assessment FROM CHAKDARA TO MADYAN
Environmental Impact Assessment FROM CHAKDARA TO MADYAN
 
Power point aec
Power point aecPower point aec
Power point aec
 
[#openIQUII - Workshop] Personal e Executive Branding
[#openIQUII - Workshop] Personal e Executive Branding[#openIQUII - Workshop] Personal e Executive Branding
[#openIQUII - Workshop] Personal e Executive Branding
 
ラルフローレン塗料とクーポンコードで
ラルフローレン塗料とクーポンコードでラルフローレン塗料とクーポンコードで
ラルフローレン塗料とクーポンコードで
 
Taz art01 f_sn_p_e
Taz art01 f_sn_p_eTaz art01 f_sn_p_e
Taz art01 f_sn_p_e
 
Environment quotes, green sayings, ecology, conservation, pollution, etc
Environment quotes, green sayings, ecology, conservation, pollution, etcEnvironment quotes, green sayings, ecology, conservation, pollution, etc
Environment quotes, green sayings, ecology, conservation, pollution, etc
 
Fundamental of computer
Fundamental of computerFundamental of computer
Fundamental of computer
 
Aa resume frank pullizzi new one 10 18-16
Aa resume frank pullizzi  new one  10 18-16Aa resume frank pullizzi  new one  10 18-16
Aa resume frank pullizzi new one 10 18-16
 
Blogging & e portfolios PD by Jocelyn Sutherland
Blogging & e portfolios PD by Jocelyn SutherlandBlogging & e portfolios PD by Jocelyn Sutherland
Blogging & e portfolios PD by Jocelyn Sutherland
 

Ähnlich wie Docker: ao vivo e a cores

DeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to DockerDeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to DockerSteve Smith
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Ontico
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingSteve Smith
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with dockerGiacomo Bagnoli
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
Creating docker custom image
Creating docker custom imageCreating docker custom image
Creating docker custom imaget lc
 
Creating docker custom image
Creating docker custom imageCreating docker custom image
Creating docker custom imaget lc
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...NLJUG
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de DockerProto204
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK SeminarMartin Scharm
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker皓鈞 張
 

Ähnlich wie Docker: ao vivo e a cores (20)

DeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to DockerDeveloperWeek 2015: A Practical Introduction to Docker
DeveloperWeek 2015: A Practical Introduction to Docker
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration training
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
Docker
DockerDocker
Docker
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Creating docker custom image
Creating docker custom imageCreating docker custom image
Creating docker custom image
 
Creating docker custom image
Creating docker custom imageCreating docker custom image
Creating docker custom image
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
 
Lab docker
Lab dockerLab docker
Lab docker
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 

Kürzlich hochgeladen

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Kürzlich hochgeladen (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Docker: ao vivo e a cores

  • 1. Docker ao vivo e a cores Pedro Arthur P. R. Duarte pedroarthur.jedi@gmail.com
  • 5. E por que só agora? https://en.wikipedia.org/wiki/Docker_(software) 5
  • 7. Principais engines de tempo de execução http://docker.com/ http://coreos.com/rkt/ 7
  • 8. Execução de Processos em Containers https://coreos.com/rkt/docs/latest/rkt-vs-other-projects.html 8
  • 10. Baixando e executando containers r2@d2 $ docker pull debian:jessie jessie: Pulling from library/debian 386a066cd84a: Pull complete Digest: sha256:c1ce85a0f7126a3b5cbf7c57676b01b37c755b9ff9e2f39ca88181c02b985724 Status: Downloaded newer image for debian:jessie r1@d2 $ docker run -it debian:jessie /bin/bash root@c0c4c014d3af:/# ping 4.2.2.2 PING 4.2.2.2 (4.2.2.2): 56 data bytes 64 bytes from 4.2.2.2: icmp_seq=0 ttl=53 time=109.191 ms --- 4.2.2.2 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 109.191/109.191/109.191/0.000 ms root@c0c4c014d3af:/# exit 0 r1@d2 $ docker run -t debian:jessie ping -c 1 4.2.2.2 # mostly the same as the previous command 10
  • 11. Construindo um Container: aplicação Servidor de Echo #!/ usr/bin/env python from twisted.internet.protocol import Protocol , Factory from twisted.internet import reactor from twisted.python import log from sys import stdout class Echo(Protocol ): def dataReceived (self , data ): log.msg("Received", data) self.transport.write(data) log. startLogging (stdout) log.msg("Echo server is starting") reactor.listenTCP (8000 , Factory. forProtocol (Echo )) reactor.run () 11
  • 12. Construindo um Container: Dockerfile Arquivo de Descrição do Container FROM debian:jessie RUN apt -get update && apt -get install -y python -twisted && apt -get clean COPY echo_server .py /usr/local/bin EXPOSE 8000 CMD exec /usr/local/bin/ echo_server .py 12
  • 13. Construindo um Container: build r2@d2 $ docker build -t poticon_echo_server:1.0 . Sending build context to Docker daemon 5.12 kB Step 1 : FROM debian:jessie ---> 73e72bf822ca Step 2 : RUN apt-get update && apt-get install -y python-twisted && apt ---> Running in e37b92a3c12b # a lot of apt-get-related output ---> 6fbd3015ca0c Removing intermediate container e37b92a3c12b Step 3 : COPY echo_server.py /usr/local/bin ---> 87add3168ac0 Removing intermediate container 956612405c96 Step 4 : EXPOSE 8000 ---> Running in 810fee23449d ---> 70890ad7e011 Removing intermediate container 810fee23449d Step 5 : CMD exec /usr/local/bin/echo_server.py ---> Running in 65fd3384e5eb ---> 1b46b966c54e Removing intermediate container 65fd3384e5eb Successfully built 1b46b966c54e
  • 14. Executando e Testando nosso container r2@d2 $ docker run -t --net=host poticon_echo_server:1.0 2016-11-24 12:53:19+0000 [-] Log opened. 2016-11-24 12:53:19+0000 [-] Echo server is starting 2016-11-24 12:53:19+0000 [-] Factory starting on 8000 2016-11-24 12:53:19+0000 [-] Starting factory <twisted.internet.protocol.Factory in 2016-11-24 12:53:28+0000 [Echo,0,127.0.0.1] Received Hi, there! # at another terminal; ts comes from moreutils r2@d2 $ nc 127.0.0.1 8000 | ts ’%F %T’ Hi, there! 2016-11-24 12:53:28 Hi, there! 14
  • 15. Composição de Serviços r2@d2 $ cat docker-compose.yaml version: ’2’ services: redis: image: redis postgresql: image: postgres environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=$PG_PASSWORD r2@d2 $ export PG_PASSWORD=p0t1c0n r2@d2 $ docker-compose up -d # -d puts them in background r2@d2 $ docker-compose logs # use -f to follow r2@d2 $ docker-compose down # mind other commands such as stop and start 15
  • 18. Links Úteis Tecnologias de Containers: – Docker: http://github.com/docker/ – Rkt: http://coreos.com/rkt Orquestradores de Containers – CoreOS: http://coreos.com – Kubernetes: http://github.com/kubernetes – Swarm: http://docker.com/swarm 18