SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
Dockerize Everything
Thomas Einwaller, troii Software
@tompson
products
products
technologies
2008
2008
2013
Number of Processes
~$ ps ax | wc -l
283
~$ docker run ubuntu ps ax
PID TTY STAT TIME COMMAND
1 ? Rs 0:00 ps ax
code
runtime
libraries
OS
container
what is in a container?
image layers
ubuntu
nginx java
tomcat
App A App B
wordpress website X
“inheritance”
one process per container
tomcat mysql
war, .properties
link
container A container B
immutable
ship the whole environment
DevOps
How to get started?
Docker Toolbox
Search and Run an Image
~$ docker search -s 10 wordpress
NAME DESCRIPTION STARS OFFICIAL
wordpress The WordPress rich content management syst... 323 [OK]
tutum/wordpress Wordpress Docker image - listens in port 8... 40
...
~$ docker run wordpress
Unable to find image 'wordpress:latest' locally
latest: Pulling from wordpress
60fa28093d2e: Pull complete
a8f83d6d9aa9: Pull complete
d0ca8f539db8: Pull complete
...
How to build my own?
Custom Container
~$ docker run -it ubuntu /bin/bash
root:/#
root:/# apt-get install -y mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
…
Commit Container
~$ docker ps
CONTAINER ID IMAGE COMMAND NAMES
e5a0e59fd3fd ubuntu:latest "/bin/bash" prickly_nobel
~$ docker commit prickly_nobel tom/mysql
CONTAINER ID IMAGE COMMAND NAMES
e5a0e59fd3fd ubuntu:latest "/bin/bash" prickly_nobel
~$ docker images
REPOSITORY TAG IMAGE ID VIRTUAL SIZE
tom/mysql latest 86a1fcd53530 512.1 MB
~$ docker run tom/mysql
...
Dockerfile
FROM ubuntu
MAINTAINER Thomas Einwaller, tom@troii.com
RUN apt-get update && apt-get -y install apache2
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
RUN mkdir /var/lock/apache2
EXPOSE 80
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
Docker build
~$ docker build -t tom/apache2 .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu
---> bdb87369f343
Step 1 : MAINTAINER Thomas Einwaller, tom@troii.com
---> Using cache
---> adcf06d4a78f
Step 2 : RUN apt-get update && apt-get -y install apache2
---> Using cache
---> 5aee61ee1c84
...
Step 9 : EXPOSE 80
---> Using cache
---> ac985c02bfd6
Step 10 : CMD /usr/sbin/apache2 -D FOREGROUND
---> Running in 0a822e00e190
---> 89ac6eef066c
Successfully built 89ac6eef066c
Docker history
~$ docker history tom/apache2
IMAGE CREATED CREATED BY SIZE
a6b064aec848 2 minutes ago /bin/sh -c #(nop) CMD ["/usr/sbin/apache2" "- 0 B
dc0e02dc4d11 2 minutes ago /bin/sh -c #(nop) EXPOSE 80/tcp 0 B
1bc593d23431 2 minutes ago /bin/sh -c mkdir /var/lock/apache2 0 B
afdda46774c6 2 minutes ago /bin/sh -c #(nop) ENV APACHE_PID_FILE=/var/ru 0 B
7f1a112bfd2e 2 minutes ago /bin/sh -c #(nop) ENV APACHE_LOCK_DIR=/var/lo 0 B
8a95fc52c646 2 minutes ago /bin/sh -c #(nop) ENV APACHE_LOG_DIR=/var/log 0
Ba32a610ccb8 2 minutes ago /bin/sh -c #(nop) ENV APACHE_RUN_GROUP=www-da 0 B
8083f7e42d6d 2 minutes ago /bin/sh -c #(nop) ENV APACHE_RUN_USER=www-dat 0 B
8cbd4df21d8b 2 minutes ago /bin/sh -c apt-get update && apt-get -y insta 30.63 MB
ddfbce728239 2 minutes ago /bin/sh -c #(nop) MAINTAINER Thomas Einwaller 0 B
bdb87369f343 5 weeks ago /bin/sh -c #(nop) CMD [/bin/zsh] 0 B
....
Docker push
~$ docker push tom/apache2
Sending image list
Pushing repository tom/apache2 (1 tags)
Image 511136ea3c5a already pushed, skipping
Image 9fec74352904 already pushed, skipping
Image d0955f21bf24 already pushed, skipping
...
Docker push
~$ docker push tom/apache2
Sending image list
Pushing repository tom/apache2 (1 tags)
Image 511136ea3c5a already pushed, skipping
Image 9fec74352904 already pushed, skipping
Image d0955f21bf24 already pushed, skipping
...
and pull
~$ docker pull tom/apache2
Unable to find image 'tom/apache2:latest' locally
latest: Pulling from tom/apache2
60fa28093d2e: Pull complete
a8f83d6d9aa9: Pull complete
d0ca8f539db8: Pull complete
...
How to use it?
git
repository
artifact
repository
Development
Environment
Continuous
Integration
Source
Artifact
(.war, .jar, ...)
Test/Prod
Environment
build / deployment pipeline before docker
build / deployment pipeline with docker
git
repository
artifact
repository
docker
repository
Development
Environment
Continuous
Integration
Source
Artifact
(.war, .jar, ...)
Continuous
Integration
Test/Prod
Environment
Docker
Image
Development Environment
~$ docker run -v /Users/tom/website:/website nginx
…
~$ docker run -v /Users/tom/code:/code node
…
or
Backup Tools
~$ docker run --volumes-from=nexus_data
-e SOURCE=/usr/local/sonatype-work
-e TARGET=s3://s3-eu-west-1.amazonaws.com/nexus-backup/
-e TARGET_USER=$AWSACCESSKEYID
-e TARGET_PASS=$AWSSECRETACCESSKEY
duply
~$ docker run --link mysql:db
-e BUCKET_NAME=mysql-backup
-e AWSACCESSKEYID=$AWSACCESSKEYID
-e AWSSECRETACCESSKEY=$AWSSECRETACCESSKEY
-e DBNAMES=test
-e USERNAME=user
-e PASSWORD=password
automysqlbackup
Backup Tools
~$ docker run -v /home/tom/development/src:/src groovy //.gvm/groovy/
current/bin/groovy /src/script.groovy
~$
dexec
dexec
Docker machine
~$ docker-machine create --driver virtualbox dev
INFO[0001] Downloading boot2docker.iso to /home/tom/.docker/machine/
INFO[0011] Creating SSH key...
INFO[0012] Creating VirtualBox VM...
INFO[0019] Starting VirtualBox VM...
...
~$ docker-machine ls
NAME ACTIVE DRIVER STATE URL
dev * virtualbox Running tcp://192.168.99.103:2376
staging digitalocean Running tcp://104.236.50.118:2376
Docker compose
nginx:
image: nginx:1.9.6
ports:
- "80:80"
links:
- webapp
webapp:
build: .
links:
- db
db:
image: postgres
docker swarm
docker networking
https://github.com/docker/dockercraft
https://github.com/docker/dockercraft
conclusion
• set up development environments (database, languages, …)
• move packages to test environments (no more “works on my machine”)
• move the SAME package to production (server, cloud …)
timr.com discount code ‘TOPCONF’ -20 %
@tompson
tom@troii.com

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and TricksKevin Cross
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker皓鈞 張
 
Quay 3.3 installation
Quay 3.3 installationQuay 3.3 installation
Quay 3.3 installationJooho Lee
 
Learn RabbitMQ with Python in 90mins
Learn RabbitMQ with Python in 90minsLearn RabbitMQ with Python in 90mins
Learn RabbitMQ with Python in 90minsLarry Cai
 
Docker deploy
Docker deployDocker deploy
Docker deployEric Ahn
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command linedotCloud
 
OpenShift4 Installation by UPI on kvm
OpenShift4 Installation by UPI on kvmOpenShift4 Installation by UPI on kvm
OpenShift4 Installation by UPI on kvmJooho Lee
 
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
 
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 at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital OceanCloud 66
 
Docker Ecosystem: Part V - Docker Registry
Docker Ecosystem: Part V - Docker RegistryDocker Ecosystem: Part V - Docker Registry
Docker Ecosystem: Part V - Docker RegistryMario IC
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyAndré Rømcke
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioUilian Ries
 
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018Oracle Korea
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersUilian Ries
 

Was ist angesagt? (20)

JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
 
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
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and Tricks
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Quay 3.3 installation
Quay 3.3 installationQuay 3.3 installation
Quay 3.3 installation
 
Learn RabbitMQ with Python in 90mins
Learn RabbitMQ with Python in 90minsLearn RabbitMQ with Python in 90mins
Learn RabbitMQ with Python in 90mins
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
OpenShift4 Installation by UPI on kvm
OpenShift4 Installation by UPI on kvmOpenShift4 Installation by UPI on kvm
OpenShift4 Installation by UPI on kvm
 
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...
 
Docker
DockerDocker
Docker
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
 
Docker Ecosystem: Part V - Docker Registry
Docker Ecosystem: Part V - Docker RegistryDocker Ecosystem: Part V - Docker Registry
Docker Ecosystem: Part V - Docker Registry
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and Symfony
 
Docker Presentation
Docker Presentation Docker Presentation
Docker Presentation
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.io
 
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
[Hands-on 필수준비사항] Oracle Developer Meetup 3rd | Jan 27th, 2018
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
 

Andere mochten auch

Dockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeDockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeAlessandro Nadalin
 
Dockerize Our Development Machine
Dockerize Our Development MachineDockerize Our Development Machine
Dockerize Our Development MachinePanji Gautama
 
Running and Scaling Docker Containers with Kontena
Running and Scaling Docker Containers with KontenaRunning and Scaling Docker Containers with Kontena
Running and Scaling Docker Containers with KontenaJussi Nummelin
 
Dockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsKite Koga
 
I tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSI tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSJorge Morales
 
Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js applicationSeokjun Kim
 

Andere mochten auch (6)

Dockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeDockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in Rome
 
Dockerize Our Development Machine
Dockerize Our Development MachineDockerize Our Development Machine
Dockerize Our Development Machine
 
Running and Scaling Docker Containers with Kontena
Running and Scaling Docker Containers with KontenaRunning and Scaling Docker Containers with Kontena
Running and Scaling Docker Containers with Kontena
 
Dockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/Windows
 
I tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSI tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaS
 
Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js application
 

Ähnlich wie Dockerize everything TopConf Tallinn

Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Ontico
 
Docker in Action
Docker in ActionDocker in Action
Docker in ActionAlper Kanat
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerGuido Schmutz
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingSteve Smith
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutesLarry Cai
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4Hojin Kim
 
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
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session DockerLinetsChile
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshopRuncy Oommen
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsThomas Poetter
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystempsconnolly
 

Ähnlich wie Dockerize everything TopConf Tallinn (20)

Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 
Docker: ao vivo e a cores
Docker: ao vivo e a coresDocker: ao vivo e a cores
Docker: ao vivo e a cores
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration training
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Docker orchestration v4
Docker orchestration v4Docker orchestration v4
Docker orchestration v4
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing 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
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
 
Docker Introductory workshop
Docker Introductory workshopDocker Introductory workshop
Docker Introductory workshop
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Clouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & InfographicsClouds and Tools: Cheat Sheets & Infographics
Clouds and Tools: Cheat Sheets & Infographics
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Dockerize everything TopConf Tallinn

  • 1. Dockerize Everything Thomas Einwaller, troii Software @tompson
  • 2.
  • 5.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Number of Processes ~$ ps ax | wc -l 283 ~$ docker run ubuntu ps ax PID TTY STAT TIME COMMAND 1 ? Rs 0:00 ps ax
  • 15.
  • 18. ubuntu nginx java tomcat App A App B wordpress website X “inheritance”
  • 19. one process per container tomcat mysql war, .properties link container A container B
  • 21. ship the whole environment
  • 23. How to get started?
  • 25.
  • 26.
  • 27.
  • 28. Search and Run an Image ~$ docker search -s 10 wordpress NAME DESCRIPTION STARS OFFICIAL wordpress The WordPress rich content management syst... 323 [OK] tutum/wordpress Wordpress Docker image - listens in port 8... 40 ... ~$ docker run wordpress Unable to find image 'wordpress:latest' locally latest: Pulling from wordpress 60fa28093d2e: Pull complete a8f83d6d9aa9: Pull complete d0ca8f539db8: Pull complete ...
  • 29. How to build my own?
  • 30. Custom Container ~$ docker run -it ubuntu /bin/bash root:/# root:/# apt-get install -y mysql-server Reading package lists... Done Building dependency tree Reading state information... Done …
  • 31. Commit Container ~$ docker ps CONTAINER ID IMAGE COMMAND NAMES e5a0e59fd3fd ubuntu:latest "/bin/bash" prickly_nobel ~$ docker commit prickly_nobel tom/mysql CONTAINER ID IMAGE COMMAND NAMES e5a0e59fd3fd ubuntu:latest "/bin/bash" prickly_nobel ~$ docker images REPOSITORY TAG IMAGE ID VIRTUAL SIZE tom/mysql latest 86a1fcd53530 512.1 MB ~$ docker run tom/mysql ...
  • 32. Dockerfile FROM ubuntu MAINTAINER Thomas Einwaller, tom@troii.com RUN apt-get update && apt-get -y install apache2 ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid RUN mkdir /var/lock/apache2 EXPOSE 80 CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
  • 33. Docker build ~$ docker build -t tom/apache2 . Sending build context to Docker daemon 2.048 kB Sending build context to Docker daemon Step 0 : FROM ubuntu ---> bdb87369f343 Step 1 : MAINTAINER Thomas Einwaller, tom@troii.com ---> Using cache ---> adcf06d4a78f Step 2 : RUN apt-get update && apt-get -y install apache2 ---> Using cache ---> 5aee61ee1c84 ... Step 9 : EXPOSE 80 ---> Using cache ---> ac985c02bfd6 Step 10 : CMD /usr/sbin/apache2 -D FOREGROUND ---> Running in 0a822e00e190 ---> 89ac6eef066c Successfully built 89ac6eef066c
  • 34. Docker history ~$ docker history tom/apache2 IMAGE CREATED CREATED BY SIZE a6b064aec848 2 minutes ago /bin/sh -c #(nop) CMD ["/usr/sbin/apache2" "- 0 B dc0e02dc4d11 2 minutes ago /bin/sh -c #(nop) EXPOSE 80/tcp 0 B 1bc593d23431 2 minutes ago /bin/sh -c mkdir /var/lock/apache2 0 B afdda46774c6 2 minutes ago /bin/sh -c #(nop) ENV APACHE_PID_FILE=/var/ru 0 B 7f1a112bfd2e 2 minutes ago /bin/sh -c #(nop) ENV APACHE_LOCK_DIR=/var/lo 0 B 8a95fc52c646 2 minutes ago /bin/sh -c #(nop) ENV APACHE_LOG_DIR=/var/log 0 Ba32a610ccb8 2 minutes ago /bin/sh -c #(nop) ENV APACHE_RUN_GROUP=www-da 0 B 8083f7e42d6d 2 minutes ago /bin/sh -c #(nop) ENV APACHE_RUN_USER=www-dat 0 B 8cbd4df21d8b 2 minutes ago /bin/sh -c apt-get update && apt-get -y insta 30.63 MB ddfbce728239 2 minutes ago /bin/sh -c #(nop) MAINTAINER Thomas Einwaller 0 B bdb87369f343 5 weeks ago /bin/sh -c #(nop) CMD [/bin/zsh] 0 B ....
  • 35.
  • 36. Docker push ~$ docker push tom/apache2 Sending image list Pushing repository tom/apache2 (1 tags) Image 511136ea3c5a already pushed, skipping Image 9fec74352904 already pushed, skipping Image d0955f21bf24 already pushed, skipping ...
  • 37. Docker push ~$ docker push tom/apache2 Sending image list Pushing repository tom/apache2 (1 tags) Image 511136ea3c5a already pushed, skipping Image 9fec74352904 already pushed, skipping Image d0955f21bf24 already pushed, skipping ... and pull ~$ docker pull tom/apache2 Unable to find image 'tom/apache2:latest' locally latest: Pulling from tom/apache2 60fa28093d2e: Pull complete a8f83d6d9aa9: Pull complete d0ca8f539db8: Pull complete ...
  • 38. How to use it?
  • 40. build / deployment pipeline with docker git repository artifact repository docker repository Development Environment Continuous Integration Source Artifact (.war, .jar, ...) Continuous Integration Test/Prod Environment Docker Image
  • 41. Development Environment ~$ docker run -v /Users/tom/website:/website nginx … ~$ docker run -v /Users/tom/code:/code node …
  • 42. or
  • 43. Backup Tools ~$ docker run --volumes-from=nexus_data -e SOURCE=/usr/local/sonatype-work -e TARGET=s3://s3-eu-west-1.amazonaws.com/nexus-backup/ -e TARGET_USER=$AWSACCESSKEYID -e TARGET_PASS=$AWSSECRETACCESSKEY duply ~$ docker run --link mysql:db -e BUCKET_NAME=mysql-backup -e AWSACCESSKEYID=$AWSACCESSKEYID -e AWSSECRETACCESSKEY=$AWSSECRETACCESSKEY -e DBNAMES=test -e USERNAME=user -e PASSWORD=password automysqlbackup
  • 44. Backup Tools ~$ docker run -v /home/tom/development/src:/src groovy //.gvm/groovy/ current/bin/groovy /src/script.groovy ~$
  • 45. dexec
  • 46. dexec
  • 47. Docker machine ~$ docker-machine create --driver virtualbox dev INFO[0001] Downloading boot2docker.iso to /home/tom/.docker/machine/ INFO[0011] Creating SSH key... INFO[0012] Creating VirtualBox VM... INFO[0019] Starting VirtualBox VM... ... ~$ docker-machine ls NAME ACTIVE DRIVER STATE URL dev * virtualbox Running tcp://192.168.99.103:2376 staging digitalocean Running tcp://104.236.50.118:2376
  • 48. Docker compose nginx: image: nginx:1.9.6 ports: - "80:80" links: - webapp webapp: build: . links: - db db: image: postgres
  • 51.
  • 54.
  • 55. conclusion • set up development environments (database, languages, …) • move packages to test environments (no more “works on my machine”) • move the SAME package to production (server, cloud …)
  • 56. timr.com discount code ‘TOPCONF’ -20 % @tompson tom@troii.com