This slide presentation discusses using Docker containers and JFrog Artifactory for continuous delivery of applications. It addresses how to set up repositories in Artifactory to support different environments like development, testing, staging and production. It also discusses using a layered approach to container builds, with shared base images, to optimize builds and promote containers through the different environments. The presentation emphasizes the need for automation, speed and quality controls when using containers in a continuous delivery pipeline.
21. That’s why.
@JBARUCH #SCALE15X 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
22. That’s why.
@JBARUCH #SCALE15X 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?
23. That’s why.
@JBARUCH #SCALE15X 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?
24. That’s why.
@JBARUCH #SCALE15X 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?
25. That’s why.
@JBARUCH #SCALE15X HTTP://JFROG.COM/SHOWNOTES
FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98
RUN mvn clean install
CMD ”java –jar Main.class"
What about this?
26. That’s why.
@JBARUCH #SCALE15X 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?
27. That’s why you don’t trust Docker
@JBARUCH #SCALE15X HTTP://JFROG.COM/SHOWNOTES
35. What’s up with the gates?!
- QA shouldn’t test dev images
36. What’s up with the gates?!
- QA shouldn’t test dev images
- non-tested images shouldn't be
staged
37. 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!!!
42. 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 #SCALE15X HTTP://JFROG.COM/SHOWNOTES
46. Virtual hosts/ports to the rescue
https://host:port/v2/busybox
Registry host Tag name
docker tag host:port/busybox
47. 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
48. 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 #SCALE15X HTTP://JFROG.COM/SHOWNOTES
49. But then you realize…
Wait a second, now I need
to pull, retag and push for
every step?!
50.
51.
52. Anatomy of a container
@JBARUCH #SCALE15X HTTP://JFROG.COM/SHOWNOTES