from development to production with docker and docker datacenter
TRANSCRIPT
![Page 1: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/1.jpg)
FromDevelopmenttoProductionwithDockerandDockerDatacenter
PHPKonf Istanbul21May2016
![Page 2: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/2.jpg)
LorenzoFontana
@fntlnz
• DevOps Expertat Kiratech• Techincal writer fortheCodeship’s blog• VIMPHPMaintainer• Also aPHPDeveloper• Automate everything!• https://github.com/fntlnz• https://twitter.com/fntlnz• Idon’tlikevowels• http://fntlnz.wtf
![Page 3: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/3.jpg)
AboutKiratech
![Page 4: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/4.jpg)
AboutKiratech
1° CertifiedPartnerinItalia
![Page 5: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/5.jpg)
WhatisDocker?
“Docker containers wrap up a piece of software in a complete filesystem that contains
everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it
will always run the same, regardless of the environment it is running in.”
https://www.docker.com/what-docker
![Page 6: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/6.jpg)
Onceuponatime….VMs!
![Page 7: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/7.jpg)
Afewconceptshere…
•Docker images•Docker containers•Docker volumes•Docker networks
![Page 8: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/8.jpg)
Yoursystemisalreadycontainerised!
• Namespaces:limitswhatyoucanuse.(netns,user,pid etc…)• Cgroups:limitshowmuchyoucanuse(memory,CPU,IO,Network,devices)• Copyonwritestorage• Andmuchmore:)
What’sbehindacontainer?
![Page 9: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/9.jpg)
OSSEcosystem
•Docker Engine•DockerMachine•DockerSwarm•DockerCompose•DockerRegistry(andthepublicDockerhub)•Notary• Interlock• Something newreleased afew minutesago
![Page 10: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/10.jpg)
DockercanrunPHPprogramstoo!
![Page 11: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/11.jpg)
Fromnowon,wewillhaveafewdemos
Maytheforcebewithme
![Page 12: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/12.jpg)
AsimplePHPcontainer
docker run -it \-p 8080:8080 \php:7.0.6-alpine \sh -c 'mkdir /code;echo "<?php phpinfo();"> /code/index.php;php -S 0.0.0.0:8080 -t /code'
![Page 13: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/13.jpg)
AcustomDockerfile forthis
FROM php:7.0.6-alpine
ADD code/ /code
EXPOSE 8080
CMD ["php", "-S", "0.0.0.0:8080", "-t", "/code"]
![Page 14: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/14.jpg)
Ok,but,IwantaWebserver,adatabase,akeyvaluestoreanda
messagebroker!
![Page 15: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/15.jpg)
Onecontainerperservice!Wealreadyneedtwoofthem,
PHP-FPMandNGINX
![Page 16: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/16.jpg)
Orchestratingcontainerdependenciesmanuallyispainful
![Page 17: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/17.jpg)
docker-composeTOTHERESCUE!
![Page 18: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/18.jpg)
version: '2'services:
nginx:image: nginx:latestports:
- "80:80"links:
- phpvolumes_from:
- php
php:build: php:7.0.6-fpm-alpineexpose:
- "9000"volumes:
- ./:/var/www/application
Asimpledocker-compose.yml
![Page 19: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/19.jpg)
DEMOTIME!
![Page 20: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/20.jpg)
CSEcosystem
• CSEngines• UCP• DTR
![Page 21: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/21.jpg)
DockerDatacenter
![Page 22: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/22.jpg)
UCP
• GUIformanagementofapps,containers,networks,images,volumes etc..• Built-inauthentication• AD/LDAPauthentication• Compatiblewithdocker-compose• ExposestheDockerAPI• BackedbySwarm• Built-inHA• Commerciallysupported• MonitoringandloggingofUCPusersandevents
![Page 23: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/23.jpg)
DEMOTIME!
![Page 24: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/24.jpg)
DTR
• GUI• Built-inauthentication• AD/LDAPauthentication• Userauditlogs• RBAC• Built-inHA• DockerContentTrustimageandsigningverification• MonitoringandloggingofUCPusersandevents
![Page 25: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/25.jpg)
DEMOTIME!
![Page 26: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/26.jpg)
Monitoring
• ElasticDockerBeat+Kibana• Cadvisor• Prometheus• Graylog• IntegratedinUCP!
![Page 27: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/27.jpg)
Questions?
![Page 28: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/28.jpg)
https://joind.in/talk/c3d3f
Ratethetalk!
![Page 29: From Development to Production with Docker and Docker Datacenter](https://reader030.vdocuments.us/reader030/viewer/2022021502/58832bb31a28abe2758b77dd/html5/thumbnails/29.jpg)
WAAAAAAAIT!Ihave afew stickers withme:D
Justask if you want one!
You cantweet @fntlnz if you can’t findme,but you should I’m somewhat big