Discussed docker concept, docker containers usage in Java project. Reviewed issues related to Vagrant docker provisioning. Reviewed docker use case in current project
13. Terms
Container How you run your application
Images How you store your application
Docker file
FROMdebian:stable
RUNapt-getupdate&&apt-getinstall-y--force-yesapache2
EXPOSE80443
VOLUME["/var/www","/var/log/apache2","/etc/apache2"]
ENTRYPOINT["/usr/sbin/apache2ctl","-D","FOREGROUND"]
14. Most Popular Docker commands
docker run
docker stop
docker start
docker restart
docker logs
docker exec
docker rm
docker rmi
docker ps
docker images
15. Docker tips
Use Docker compose
It's impossible to use many container w/o automation tool like Compose
Use Docker for dev and ops
Reuse public images
Avoid manual/custom installation of popular software: db, queue, caches, etc
Docker is convenience app distribution model
24. Update staging env
Compare running container with what's been built by CI
Pulls latest images from Docker registry
Stops old version
Launches new version
Register service in Consul
25. Development Env issues
Developing 2 applications
Requires 9+ apps for properly functional integrated env
Windows Machines :-(
"Golden"/Base VM is hard to maintain
26. Vagrant ?
"Vagrant is not for managing machines, Vagrant is for managing development
environments. The fact Vagrant spins up machines is mostly historic."
Mitchell Hashimoto
32. History Notes
Vagrant
Initial release - March 8, 2010
Current Version - July 17, 2015 - v.1.7.4
Docker
Initial release - March 2013
Current Version - October 12, 2015 - v.1.8.3
33. References
SO: Should I use Vagrant or Docker.io for creating an isolated environment?
(http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-io-for-creating-an-isolated-environment)
Running Multiple Docker Containers in Vagrant with YAML(https://github.com/lowescott/learning-
tools/tree/master/vagrant-docker-yaml)
34. Thank you
22 October 2015
Tags: docker, vagrant(#ZgotmplZ)
Orest Ivasiv
Software engineer, Softserve
Docker hobbyist
http://halyph.com(http://halyph.com)
@halyph(http://twitter.com/halyph)