SlideShare a Scribd company logo
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
whoami
Baruch Sadogursky, JFrog Developer Advocate, @jbaruch
Show notes!
• http://jfrog.com/shownotes
– Video (soon!)
– Slides
– Links
– Feedback
– Raffle! (come early)
JFrog Xray
Poll Time!
Poll Time!
üHeard about Docker
üCan do the tutorial
üPoCing, playing etc.
üProduction, baby!
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
JFrog Artifactory + Docker
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Who’s using Docker and nothing else?
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
The Promotion Pyramid
Development	builds
Dev Integration	tests
Integr.	tests
Staging
Pre-Prod
Prod
Amount	of	builds
Build/Deploy	time
Amount	of	
binaries
Pipeline: Quality Gates and Visibility
Source:	Agile	ALM,	Michael	Hüttermann,	Manning	Publications	Co.	
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
$docker build
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Let’s docker build in every env!
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu
RUN apt-get install -y software-properties-common python
RUN apt-get install -y nodejs
RUN mkdir /var/www
ADD app.js /var/www/app.js
CMD ["/usr/bin/node", "/var/www/app.js"]
Latest	version
Latest	version
Latest	version
Latest	version
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:14.04
RUN apt-get install -y software-properties-common python
RUN apt-get install -y nodejs
RUN mkdir /var/www
ADD app.js /var/www/app.js
CMD ["/usr/bin/node", "/var/www/app.js"]
Better	now?
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98
RUN apt-get install -y software-properties-common python
RUN apt-get install -y nodejs
RUN mkdir /var/www
ADD app.js /var/www/app.js
CMD ["/usr/bin/node", "/var/www/app.js"]
And	now?
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98
RUN apt-get install -y software-properties-common python
RUN apt-get install -y nodejs
RUN mkdir /var/www
ADD app.js /var/www/app.js
CMD ["/usr/bin/node", "/var/www/app.js"]
And	now?What	about	those?
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98
RUN mvn clean install
CMD ”java –jar Main.class"
What	about	this?
That’s why.
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98
RUN download_random_sh*t_from_the_internet.sh
CMD ["/usr/bin/node", "/var/www/app.js"]
And	how	about	this?
That’s why you don’t trust Docker
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Traditional Server Pattern
http://martinfowler.com/bliki/ImmutableServer.html
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Immutable Server Pattern
http://martinfowler.com/bliki/ImmutableServer.html
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
What’s up with the gates?!
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
What’s up with the gates?!
What’s up with the gates?!
- QA shouldn’t test dev images
What’s up with the gates?!
- QA shouldn’t test dev images
- non-tested images shouldn't be
staged
What’s up with the gates?!
- QA shouldn’t test dev images
- non-tested images shouldn't be
staged
- non-staged, non-tested or dev
images shouldn’t end up in
production!!!
Not so fast…
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Trumped-up limitations
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
The Anatomy of Docker Tag
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Wait	a	second,	how	can	I	
have	more	than	one	
repository	per	host	now?!
How can we support this?
https://host:8081/artifactory/docker-dev/busybox
https://host:8081/artifactory/docker-staging/busybox
https://host:8081/artifactory/docker-qa/busybox
https://host:8081/artifactory/docker-prod/busybox
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
“ONE REGISTRY PER HOST OUGHT
TO BE ENOUGH FOR ANYBODY.”
Panic!
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Virtual hosts/ports to the rescue
Registry	host Tag	name
docker tag host:port/busybox
Virtual hosts/ports to the rescue
https://host:port/v2/busybox
Registry	host Tag	name
docker tag host:port/busybox
Virtual hosts/ports to the rescue
https://host:8081/artifactory/docker-dev/busybox
Virtual	repository	name Tag	name
https://host:port/v2/busybox
Context	name
Registry	host Tag	name
docker tag host:port/busybox
server {
listen 5001;
server_name 192.168.99.100;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-dev/$1/$2;
…
}
}
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
But then you realize…
Wait	a	second,	now	I	need	
to	pull,	retag	and	push	for	
every	step?!
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
Anatomy of a container
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Our Layers
Application:	
••.war	file
Framework:	
••JDK8	+	Wildfly
Base:	
••CentOS
Framework build
- Verified base image
- Add system dependencies
from artifactory
- JDK
- wildfly
- Own it!
Minimal Framework build Dockerfile
FROM centos:7
MAINTAINER you@yourorg.com
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Application build
- Framework is your base
- Run a java build
- Add a file to base
- Done!
Application build Dockerfile
FROM yourorg-docker.jfrog.io/yourorg/framework:latest
MAINTAINER you@yourorg.com
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war
/opt/jboss/wildfly/standalone/deployments/app.war
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Application build Dockerfile
FROM yourorg-docker.jfrog.io/yourorg/framework:latest
MAINTAINER you@yourorg.com
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war
/opt/jboss/wildfly/standalone/deployments/app.war
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Application build Dockerfile
FROM yourorg-docker.jfrog.io/yourorg/framework:latest
MAINTAINER you@yourorg.com
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war
/opt/jboss/wildfly/standalone/deployments/app.war
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Application build Dockerfile
FROM yourorg-docker.jfrog.io/yourorg/framework:latest
MAINTAINER you@yourorg.com
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war
/opt/jboss/wildfly/standalone/deployments/app.war
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Framework	Pipeline
Application	Pipeline
Framework	Pipeline
Application	Pipeline
Framework	Pipeline
Application	Pipeline
@JBARUCH #DOCKERDC HTTP://JFROG.COM/SHOWNOTES
Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017
HIGH QUALITY
(software and information) SPEED LOW COST
(automation)
Fast releases > Modular > Automation
Conclusions: Release Fast or Die!
Q&A and Links
• @jbaruch
• #DockerDC
• http://jfrog.com/shownotes
– Video (soon!)
– Slides
– Links
– Feedback
– Raffle! (come early)

More Related Content

PPTX
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
PPTX
How to Work Efficiently in a Hybrid Git-Perforce Environment
PPTX
Trunk Based Development in the Enterprise - Its Relevance and Economics
PDF
Trunk-Based Development
PDF
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
PDF
Porque Odeio Branches
PDF
Trunk based development for Beginners
PDF
12 tricks to avoid hackers breaks your CI / CD
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
How to Work Efficiently in a Hybrid Git-Perforce Environment
Trunk Based Development in the Enterprise - Its Relevance and Economics
Trunk-Based Development
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
Porque Odeio Branches
Trunk based development for Beginners
12 tricks to avoid hackers breaks your CI / CD

What's hot (20)

PPTX
Rooted con 2020 - from the heaven to hell in the CI - CD
PDF
Git essentials
PDF
Master Continuous Delivery with CloudBees Jenkins Platform
PDF
Jenkins CI
KEY
How we git - commit policy and code review
PPTX
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
PDF
Sonatype DevSecOps Leadership forum 2020
KEY
Development tools
PDF
Docker introduction
PPTX
CI/CD for React Native
PDF
CICD by Teerapat
PDF
Blazing Fast Feedback Loops in the Java Universe
PDF
手機自動化測試和持續整合
PPTX
Write microservice in golang
PDF
Succesful testing-continuous-delivery-testnet
PDF
Continuous integration
PDF
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
PDF
從系統思考看 DevOps:以 microservices 為例 (DevOps: a system dynamics perspective)
ODP
Jenkins CI in Action
PDF
CI/CD 101
Rooted con 2020 - from the heaven to hell in the CI - CD
Git essentials
Master Continuous Delivery with CloudBees Jenkins Platform
Jenkins CI
How we git - commit policy and code review
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Sonatype DevSecOps Leadership forum 2020
Development tools
Docker introduction
CI/CD for React Native
CICD by Teerapat
Blazing Fast Feedback Loops in the Java Universe
手機自動化測試和持續整合
Write microservice in golang
Succesful testing-continuous-delivery-testnet
Continuous integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
從系統思考看 DevOps:以 microservices 為例 (DevOps: a system dynamics perspective)
Jenkins CI in Action
CI/CD 101
Ad

Similar to Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017 (20)

PDF
Patterns and antipatterns in Docker image lifecycle as was presented at Devop...
PDF
Patterns and antipatterns in Docker image lifecycle as was presented at Globa...
PDF
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
PDF
Building a private CI/CD pipeline with Java and Docker in the cloud as presen...
PDF
Patterns and antipatterns in Docker image lifecycle @ Codemash 2017
PDF
Patterns and antipatterns in Docker image lifecycle as was presented at Oracl...
PPTX
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
PDF
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
PPTX
Patterns & Antipatterns in Docker Image Lifecycle
PDF
Best Practices In Implementing Container Image Promotion Pipelines
PPTX
Docker Container Lifecycles, Problem or Opportunity? by Baruch Sadogursky, JFrog
PDF
Docker presentasjon java bin
PPTX
JFrog container registry - DevOps extravaganza
PDF
Trust your containers in production as was presented at DockerCon 2017
PDF
Accelerate your software development with Docker
PPTX
Accelerate your development with Docker
PPTX
DockerCon 15 Keynote - Day 2
PDF
Work shop - an introduction to the docker ecosystem
PDF
Be a better developer with Docker (revision 3)
PDF
Docker: automation for the rest of us
Patterns and antipatterns in Docker image lifecycle as was presented at Devop...
Patterns and antipatterns in Docker image lifecycle as was presented at Globa...
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Building a private CI/CD pipeline with Java and Docker in the cloud as presen...
Patterns and antipatterns in Docker image lifecycle @ Codemash 2017
Patterns and antipatterns in Docker image lifecycle as was presented at Oracl...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
Patterns & Antipatterns in Docker Image Lifecycle
Best Practices In Implementing Container Image Promotion Pipelines
Docker Container Lifecycles, Problem or Opportunity? by Baruch Sadogursky, JFrog
Docker presentasjon java bin
JFrog container registry - DevOps extravaganza
Trust your containers in production as was presented at DockerCon 2017
Accelerate your software development with Docker
Accelerate your development with Docker
DockerCon 15 Keynote - Day 2
Work shop - an introduction to the docker ecosystem
Be a better developer with Docker (revision 3)
Docker: automation for the rest of us
Ad

More from Baruch Sadogursky (20)

PDF
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
PDF
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
PDF
Data driven devops as presented at QCon London 2018
PDF
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
PDF
Java Puzzlers NG S03 a DevNexus 2018
PDF
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
PDF
Data driven devops as presented at Codemash 2018
PDF
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
PPTX
Best Practices for Managing Docker Versions as presented at JavaOne 2017
PDF
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
PPTX
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
PDF
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
PDF
Let’s Wing It: A Study in DevRel Strategy
PDF
Log Driven First Class Customer Support at Scale
PDF
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Gr8Conf 2017
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
Data driven devops as presented at QCon London 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
Java Puzzlers NG S03 a DevNexus 2018
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Data driven devops as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
Let’s Wing It: A Study in DevRel Strategy
Log Driven First Class Customer Support at Scale
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Gr8Conf 2017

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Modernizing your data center with Dell and AMD
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Monthly Chronicles - July 2025
Spectral efficient network and resource selection model in 5G networks
Encapsulation_ Review paper, used for researhc scholars
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KodekX | Application Modernization Development

Patterns and antipatterns in Docker image lifecycle as was presented at DC Docker Meetup August 2017