SlideShare a Scribd company logo
1 of 65
Johan Janssen, Info Support
Continuous delivery 
Docker 
Jenkins 
Questions
Automate everything 
Software quality 
Continuous improvement 
Regular deployments 
Anyone can deploy
DevOps End users
Automate environment provisioning 
Automate application deployment
To enable continuous delivery 
Quickly provision environments 
Run the same software local and in the 
cloud 
Easy to move software 
Better performance 
Higher availability 
Cheaper
Disk space efficiency 
Memory efficiency 
Speed 
Compatibility (run anywhere) 
Isolation 
Versioning 
Internet of Things (Raspberry Pi etc.)
Simple general commands 
No Domain Specific Language (DSL) 
Configuration with operating system 
commands
Since March 2013 
8741 commits in 15 months 
More than 460 570 contributors 
Downloaded 2.75 13 million times 
More than 14000 30000 Dockerized apps 
>6500 Docker related projects on GitHub 
More than 90 user groups 
DockerCon (Europe) 
Support from Google, VMWare, RackSpace, 
Red Hat, IBM, Microsoft etcetera
Docker on Ubuntu 14.04 
apt-get install docker.io 
docker.io run -i -t ubuntu:saucy 
/bin/bash
Main directory 
BuildAndRunScript.sh 
GeneralBase 
Dockerfile 
Sonar 
Dockerfile
FROM ubuntu:saucy 
RUN apt-get -y install software-properties-common 
RUN add-apt-repository ppa:webupd8team/java 
RUN apt-get update && apt-get -y upgrade 
RUN echo "oracle-java7-installer 
shared/accepted-oracle-license-v1-1 
boolean true" | debconf-set-selections 
RUN apt-get -y install oracle-java7-installer 
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
FROM GeneralBase 
RUN apt-get install -y wget unzip 
RUN wget http://dist.sonar.codehaus.org/sonarqube- 
4.2.zip 
RUN unzip sonarqube-4.2.zip -d /opt 
RUN rm sonarqube-4.2.zip 
EXPOSE 9000 
EXPOSE 9092 
CMD ["/opt/sonarqube-4.2/bin/linux-x86-64/sonar.sh", 
"console", "/bin/bash"]
Create the Dockerfiles 
Build the containers: 
<optional>cd GeneralBase 
docker.io build -t GeneralBase . 
cd .. </optional> 
cd Sonar 
docker.io build -t Sonar .
Start the container 
docker.io run -p 9000:9000 
–p 9092:9092 -d Sonar
# docker.io ps –a 
CONTAINER ID: ecbecf77461b 
CREATED: 32 minutes ago 
STATUS: Up 32 minutes 
PORTS: 0.0.0.0:9000->9000/tcp, 
0.0.0.0:9092->9092/tcp
Start / stop / restart 
docker [start/stop/restart] 
containerid 
Follow SystemOut and SystemErr 
docker logs -f containerid
Show (running) containers 
docker ps –a 
Show processes running in container 
docker top containerid 
Show changes in the container 
docker diff containerid
Stop all containers 
docker.io stop $(docker.io ps -a -q) 
Remove all containers 
docker.io rm $(docker.io ps -a -q) 
Remove all images 
docker.io rmi $(docker.io images -q)
GeneralBase 
AppServerBase 
Environment D 
Environment T 
Environment A 
Environment P 
Jenkins 
Sonar Gitblit Nexus 
JenkinsDataContainer
Dockerfile 
ENV JENKINS_HOME /var/JenkinsData 
Docker commands 
docker.io run -v /var/JenkinsData –name 
JenkinsDataContainer ubuntu:saucy true 
docker.io run -p 8080:8080 --volumes-from 
JenkinsDataContainer -d Jenkins
# docker.io images --tree 
└─ 179.9 MB Tags: ubuntu:saucy 
└─253.6 MB 
└─741.8 MB Tags: GeneralBase:latest 
└─763.6 MB Tags: AppServerBase:latest 
… 
├─763.6 MB Tags: EnvironmentP:latest 
└─865.6 MB Tags: Nexus:latest 
└─808.3 MB Tags: Gitblit:latest 
└─901.5 MB Tags: Sonar:latest 
└─805.4 MB Tags: Jenkins:latest
real 4m11.729s 
user 0m3.329s 
sys 0m10.054s
Creating the Docker registry 
docker run -p 5000:5000 registry
Modify container 
Commit 
docker.io commit 064f 
192.168.56.31:5000/test-version-0.2 
New containerid -> ff7e 
Push 
docker.io push 
192.168.56.31:5000/test-version-0.2
Pull 
docker.io pull 192.168.56.31:5000/ 
test-version-0.2 
Run 
docker.io run -i -t ff7e /bin/bash 
View the changed container
docker images -tree 
└─153b 194.2 MB test-version-0.1:latest 
docker pull 192.168.56.31:5000/test-version- 
0.2 
ff7e: Download complete 
153b: Download complete 
docker images -tree 
└─153b 194.2 MB test-version-0.1:latest 
└─ff7e 194.2 MB test-version-0.2:latest
Simple to use 
Really popular 
Used in many organizations 
Regular updates 
Big community creating plugins etc. 
Most developers already use it
1 
2 
3 
4 
6 
7 
8 
9 
5
Continuous deployment 
Continuous delivery
“Life is really simple, but we insist on 
making it complicated.” 
- Confucius
Use a (private) Docker registry 
Use images from the registry instead of 
export 
Keep environmental settings separate 
Use Jenkins to manage everything 
Do not add extra functionality like 
OpenSSH 
Think about topics such as security, 
monitoring and logging 
Separate concerns in separate containers 
Inherit containers
johan.janssen@infosupport.com 
http://blogs.infosupport.com/author/johanj/

More Related Content

What's hot

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
D
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in Linux
Jazz Yao-Tsung Wang
 

What's hot (20)

Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Docker n co
Docker n coDocker n co
Docker n co
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
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 Workshop
Docker WorkshopDocker Workshop
Docker Workshop
 
Install openstack
Install openstackInstall openstack
Install openstack
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングCoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
 
Docker 101, Alexander Ryabtsev
Docker 101, Alexander RyabtsevDocker 101, Alexander Ryabtsev
Docker 101, Alexander Ryabtsev
 
Hybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker SwarmHybrid (Windows + Linux) Apps with Docker Swarm
Hybrid (Windows + Linux) Apps with Docker Swarm
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com
 
Launching containers with fleet
Launching containers with fleetLaunching containers with fleet
Launching containers with fleet
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Talk about Docker
Talk about DockerTalk about Docker
Talk about Docker
 
Docker 102 - Immutable Infrastructure
Docker 102 - Immutable InfrastructureDocker 102 - Immutable Infrastructure
Docker 102 - Immutable Infrastructure
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in Linux
 
Docker 101 2015-05-28
Docker 101 2015-05-28Docker 101 2015-05-28
Docker 101 2015-05-28
 
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...
 

Similar to Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen en in de cloud - Johan Janssen

Similar to Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen en in de cloud - Johan Janssen (20)

Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker advance1
Docker advance1Docker advance1
Docker advance1
 
Docker
DockerDocker
Docker
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
 
Introduction to Docker
Introduction  to DockerIntroduction  to Docker
Introduction to Docker
 
Docker advance topic
Docker advance topicDocker advance topic
Docker advance topic
 
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
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
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)
 
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
 

More from NLJUG

Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
NLJUG
 

More from NLJUG (20)

The future of Web-Scale - Johan Tillema, Rene Boere & Chris Quach
The future of Web-Scale - Johan Tillema, Rene Boere & Chris QuachThe future of Web-Scale - Johan Tillema, Rene Boere & Chris Quach
The future of Web-Scale - Johan Tillema, Rene Boere & Chris Quach
 
Speedy perception trumps speedy reception–smart asynchronous interactions - L...
Speedy perception trumps speedy reception–smart asynchronous interactions - L...Speedy perception trumps speedy reception–smart asynchronous interactions - L...
Speedy perception trumps speedy reception–smart asynchronous interactions - L...
 
Decoding the airspace above you with Java and $7 hardware - Bert Jan Schrijver
Decoding the airspace above you with Java and $7 hardware - Bert Jan SchrijverDecoding the airspace above you with Java and $7 hardware - Bert Jan Schrijver
Decoding the airspace above you with Java and $7 hardware - Bert Jan Schrijver
 
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter DanesUsing Docker to Develop, Test and Run Maven Projects - Wouter Danes
Using Docker to Develop, Test and Run Maven Projects - Wouter Danes
 
Kill the mutants and test your tests - Roy van Rijn
Kill the mutants and test your tests - Roy van RijnKill the mutants and test your tests - Roy van Rijn
Kill the mutants and test your tests - Roy van Rijn
 
Real-time user interfaces - sosm gewoon makkelijker - Allard Buijze
Real-time user interfaces - sosm gewoon makkelijker - Allard BuijzeReal-time user interfaces - sosm gewoon makkelijker - Allard Buijze
Real-time user interfaces - sosm gewoon makkelijker - Allard Buijze
 
The end of traditional enterprise IT - ING's journey to the next generation I...
The end of traditional enterprise IT - ING's journey to the next generation I...The end of traditional enterprise IT - ING's journey to the next generation I...
The end of traditional enterprise IT - ING's journey to the next generation I...
 
Performance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersPerformance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen Borgers
 
Introduction to Reactive with Play and Akka - Markus Jura
Introduction to Reactive with Play and Akka - Markus JuraIntroduction to Reactive with Play and Akka - Markus Jura
Introduction to Reactive with Play and Akka - Markus Jura
 
Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...
Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...
Web-scale op basis van Hadoop en Akka Reactive Streams - Johan Tillema, Rene ...
 
Workshop angular dart presentatie - Atos
Workshop angular dart presentatie - AtosWorkshop angular dart presentatie - Atos
Workshop angular dart presentatie - Atos
 
Workshop spring boot presentatie - Atos
Workshop spring boot presentatie - AtosWorkshop spring boot presentatie - Atos
Workshop spring boot presentatie - Atos
 
Cultivating the jenkins job jungle with groovy - Patrick van Dissel
Cultivating the jenkins job jungle with groovy - Patrick van DisselCultivating the jenkins job jungle with groovy - Patrick van Dissel
Cultivating the jenkins job jungle with groovy - Patrick van Dissel
 
Rethink your architecture - Marten Deinum
Rethink your architecture - Marten DeinumRethink your architecture - Marten Deinum
Rethink your architecture - Marten Deinum
 
Evolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopper
Evolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopperEvolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopper
Evolutionary Algorithms: the key to solving complex Java puzzles! - Bas knopper
 
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
 
Apache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn DashorstApache Wicket: 10 jaar en verder - Martijn Dashorst
Apache Wicket: 10 jaar en verder - Martijn Dashorst
 
Opening - Bert Ertman
Opening - Bert ErtmanOpening - Bert Ertman
Opening - Bert Ertman
 
Returning the right results - Jettro Coenradie
Returning the right results - Jettro CoenradieReturning the right results - Jettro Coenradie
Returning the right results - Jettro Coenradie
 
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
Reactive programming met Java 8 en Java EE 7 - Martijn BlankestijnReactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
Reactive programming met Java 8 en Java EE 7 - Martijn Blankestijn
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen en in de cloud - Johan Janssen

  • 2. Continuous delivery Docker Jenkins Questions
  • 3. Automate everything Software quality Continuous improvement Regular deployments Anyone can deploy
  • 5.
  • 6. Automate environment provisioning Automate application deployment
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. To enable continuous delivery Quickly provision environments Run the same software local and in the cloud Easy to move software Better performance Higher availability Cheaper
  • 16. Disk space efficiency Memory efficiency Speed Compatibility (run anywhere) Isolation Versioning Internet of Things (Raspberry Pi etc.)
  • 17. Simple general commands No Domain Specific Language (DSL) Configuration with operating system commands
  • 18. Since March 2013 8741 commits in 15 months More than 460 570 contributors Downloaded 2.75 13 million times More than 14000 30000 Dockerized apps >6500 Docker related projects on GitHub More than 90 user groups DockerCon (Europe) Support from Google, VMWare, RackSpace, Red Hat, IBM, Microsoft etcetera
  • 19.
  • 20.
  • 21. Docker on Ubuntu 14.04 apt-get install docker.io docker.io run -i -t ubuntu:saucy /bin/bash
  • 22.
  • 23. Main directory BuildAndRunScript.sh GeneralBase Dockerfile Sonar Dockerfile
  • 24. FROM ubuntu:saucy RUN apt-get -y install software-properties-common RUN add-apt-repository ppa:webupd8team/java RUN apt-get update && apt-get -y upgrade RUN echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections RUN apt-get -y install oracle-java7-installer ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
  • 25. FROM GeneralBase RUN apt-get install -y wget unzip RUN wget http://dist.sonar.codehaus.org/sonarqube- 4.2.zip RUN unzip sonarqube-4.2.zip -d /opt RUN rm sonarqube-4.2.zip EXPOSE 9000 EXPOSE 9092 CMD ["/opt/sonarqube-4.2/bin/linux-x86-64/sonar.sh", "console", "/bin/bash"]
  • 26. Create the Dockerfiles Build the containers: <optional>cd GeneralBase docker.io build -t GeneralBase . cd .. </optional> cd Sonar docker.io build -t Sonar .
  • 27. Start the container docker.io run -p 9000:9000 –p 9092:9092 -d Sonar
  • 28. # docker.io ps –a CONTAINER ID: ecbecf77461b CREATED: 32 minutes ago STATUS: Up 32 minutes PORTS: 0.0.0.0:9000->9000/tcp, 0.0.0.0:9092->9092/tcp
  • 29. Start / stop / restart docker [start/stop/restart] containerid Follow SystemOut and SystemErr docker logs -f containerid
  • 30. Show (running) containers docker ps –a Show processes running in container docker top containerid Show changes in the container docker diff containerid
  • 31. Stop all containers docker.io stop $(docker.io ps -a -q) Remove all containers docker.io rm $(docker.io ps -a -q) Remove all images docker.io rmi $(docker.io images -q)
  • 32. GeneralBase AppServerBase Environment D Environment T Environment A Environment P Jenkins Sonar Gitblit Nexus JenkinsDataContainer
  • 33. Dockerfile ENV JENKINS_HOME /var/JenkinsData Docker commands docker.io run -v /var/JenkinsData –name JenkinsDataContainer ubuntu:saucy true docker.io run -p 8080:8080 --volumes-from JenkinsDataContainer -d Jenkins
  • 34. # docker.io images --tree └─ 179.9 MB Tags: ubuntu:saucy └─253.6 MB └─741.8 MB Tags: GeneralBase:latest └─763.6 MB Tags: AppServerBase:latest … ├─763.6 MB Tags: EnvironmentP:latest └─865.6 MB Tags: Nexus:latest └─808.3 MB Tags: Gitblit:latest └─901.5 MB Tags: Sonar:latest └─805.4 MB Tags: Jenkins:latest
  • 35. real 4m11.729s user 0m3.329s sys 0m10.054s
  • 36.
  • 37.
  • 38. Creating the Docker registry docker run -p 5000:5000 registry
  • 39. Modify container Commit docker.io commit 064f 192.168.56.31:5000/test-version-0.2 New containerid -> ff7e Push docker.io push 192.168.56.31:5000/test-version-0.2
  • 40. Pull docker.io pull 192.168.56.31:5000/ test-version-0.2 Run docker.io run -i -t ff7e /bin/bash View the changed container
  • 41.
  • 42. docker images -tree └─153b 194.2 MB test-version-0.1:latest docker pull 192.168.56.31:5000/test-version- 0.2 ff7e: Download complete 153b: Download complete docker images -tree └─153b 194.2 MB test-version-0.1:latest └─ff7e 194.2 MB test-version-0.2:latest
  • 43.
  • 44.
  • 45.
  • 46. Simple to use Really popular Used in many organizations Regular updates Big community creating plugins etc. Most developers already use it
  • 47. 1 2 3 4 6 7 8 9 5
  • 48.
  • 49.
  • 50.
  • 51.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. “Life is really simple, but we insist on making it complicated.” - Confucius
  • 58.
  • 59. Use a (private) Docker registry Use images from the registry instead of export Keep environmental settings separate Use Jenkins to manage everything Do not add extra functionality like OpenSSH Think about topics such as security, monitoring and logging Separate concerns in separate containers Inherit containers
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.

Editor's Notes

  1. http://192.168.1.3:8080/DockerPiExample/helloworld/hello/JavaOne
  2. http://192.168.1.3:8080/DockerPiExample/helloworld/hello/JavaOne