KEMBAR78
Dockerizing development workflow | PDF
Dockerizing development
workflow
ITRally
16 May 2015
Orest Ivasiv
Software engineer, Softserve
Docker hobbyist
Outline
1. What is Docker?
2. Internals of Docker
3. Docker basic commands
4. Sample usage
History
source Wikipedia
Docker was released as open source in March 2013
History
February 2013: private repo, with liveral access (~200 people had access and helped to
review, contribute, give feedback)
March 2013: Docker 0.1 release at PyCon:
- requires LXC, AUFS;
- works on Debian/Ubuntu kernels
June 2014: Docker 1.1, released at DockerCon
May 12 2015: Docker 1.6.2, release 3 days ago
Docker Community
21500+ Github Stars
900+ Github Contributors
~50% of the commits are done by community
What is Docker?
Docker is an open source platform to automate development cycle of applications
inside software containers.
Build → ship → run any app, anywhere
Build: package your application in a container
Ship: move that container from a mashine to another
Run: execite that container (i.e. your application)
Any application: anything that runs on Linux
Anywhere: local VM, cloud instance, bare metal, etc.
Docker Host OS requirement
Linux kernel 3.8+
Union file system - AUFS, btrfs, vfs or DeviceMapper
Docker vs VM
Containers vs VMs. Diagram source: Docker Inc.
There's a great StackOverflow answer showing the differences(http://stackoverflow.com/questions/16047306/how-
is-docker-io-different-from-a-normal-virtual-machine)
Docker vs VM
Startup time is less for Docker than VMs (super fast)
Docker images have much smaller size
Snapshot process is faster in Docker than VMs
Docker images have more portability
Docker provides versioning of images
Docker images do not have states
Don't need SSH for access
Docker vs native
Docker helps to avoid lib version conflicts
Docker has no or minimal overhead while using resource for visualization
Docker Linux technology stack
Docker can use different interfaces to access virtualization features of the Linux kernel. Diagram source: Docker Inc.
Docker architecture
Docker Client
Docker Daemon
Docker Registry
Docker Internals
Docker image(http://docs.docker.com/terms/image/)
Docker layer(http://docs.docker.com/terms/layer/)
Docker container(http://docs.docker.com/terms/container/)
Docker repository(http://docs.docker.com/terms/repository/)
Docker registry(http://docs.docker.com/terms/registry/)
Docker Layers
Docker Layers
Docker Layers
Docker Layers
Use cases
1. Docker for local application development and test
Worksonmymachine→Worksagainonmymachinetomorrow→Worksonatestmachine
2. Docker for development team collaboration
Worksonmymachine→Worksonyourmachine
3. Docker for continuous integration
-Complicatedconfigurationofvarioustypesofbuildjobs(e.g.,Maven,GCCandJUnit)
-Needforacleanenvironmentforthebuildortest,toeliminatepossiblecontaminants
-ManagingthetotalexecutiontimeoftheCIworkflow
4. Docker for production application deployment
Worksonmymachine→WorksonQAmachines→Works(thesame)onproductionhardware
→Staysworking(securely)ontheproductionenvironment
5. Docker for creating a private PAAS
Docker vs Boot2Docker
Demo time
References
Official Docker documentation(http://docs.docker.com/)
Docker Cheat Sheet(https://github.com/wsargent/docker-cheat-sheet)
Docker Use cases - Article(http://blogs.gartner.com/richard-watson/ok-get-dockers-great/)
Linux Containers(https://linuxcontainers.org/)
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition,
Jérôme Petazzoni(http://www.slideshare.net/jpetazzo/introduction-to-docker-december-2014-tour-de-france-bordeaux-special-edition)
Official hosted registry https://hub.docker.com/(https://hub.docker.com/)
Thank you
Orest Ivasiv
Software engineer, Softserve
Docker hobbyist
halyph@gmail.com(mailto:halyph@gmail.com)
http://halyph.com(http://halyph.com)
@halyph(http://twitter.com/halyph)

Dockerizing development workflow

  • 1.
    Dockerizing development workflow ITRally 16 May2015 Orest Ivasiv Software engineer, Softserve Docker hobbyist
  • 2.
    Outline 1. What isDocker? 2. Internals of Docker 3. Docker basic commands 4. Sample usage
  • 3.
    History source Wikipedia Docker wasreleased as open source in March 2013
  • 4.
    History February 2013: privaterepo, with liveral access (~200 people had access and helped to review, contribute, give feedback) March 2013: Docker 0.1 release at PyCon: - requires LXC, AUFS; - works on Debian/Ubuntu kernels June 2014: Docker 1.1, released at DockerCon May 12 2015: Docker 1.6.2, release 3 days ago
  • 5.
    Docker Community 21500+ GithubStars 900+ Github Contributors ~50% of the commits are done by community
  • 6.
    What is Docker? Dockeris an open source platform to automate development cycle of applications inside software containers. Build → ship → run any app, anywhere Build: package your application in a container Ship: move that container from a mashine to another Run: execite that container (i.e. your application) Any application: anything that runs on Linux Anywhere: local VM, cloud instance, bare metal, etc.
  • 7.
    Docker Host OSrequirement Linux kernel 3.8+ Union file system - AUFS, btrfs, vfs or DeviceMapper
  • 8.
    Docker vs VM Containersvs VMs. Diagram source: Docker Inc. There's a great StackOverflow answer showing the differences(http://stackoverflow.com/questions/16047306/how- is-docker-io-different-from-a-normal-virtual-machine)
  • 9.
    Docker vs VM Startuptime is less for Docker than VMs (super fast) Docker images have much smaller size Snapshot process is faster in Docker than VMs Docker images have more portability Docker provides versioning of images Docker images do not have states Don't need SSH for access
  • 10.
    Docker vs native Dockerhelps to avoid lib version conflicts Docker has no or minimal overhead while using resource for visualization
  • 11.
    Docker Linux technologystack Docker can use different interfaces to access virtualization features of the Linux kernel. Diagram source: Docker Inc.
  • 12.
  • 13.
    Docker Internals Docker image(http://docs.docker.com/terms/image/) Dockerlayer(http://docs.docker.com/terms/layer/) Docker container(http://docs.docker.com/terms/container/) Docker repository(http://docs.docker.com/terms/repository/) Docker registry(http://docs.docker.com/terms/registry/)
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
    Use cases 1. Dockerfor local application development and test Worksonmymachine→Worksagainonmymachinetomorrow→Worksonatestmachine 2. Docker for development team collaboration Worksonmymachine→Worksonyourmachine 3. Docker for continuous integration -Complicatedconfigurationofvarioustypesofbuildjobs(e.g.,Maven,GCCandJUnit) -Needforacleanenvironmentforthebuildortest,toeliminatepossiblecontaminants -ManagingthetotalexecutiontimeoftheCIworkflow 4. Docker for production application deployment Worksonmymachine→WorksonQAmachines→Works(thesame)onproductionhardware →Staysworking(securely)ontheproductionenvironment 5. Docker for creating a private PAAS
  • 19.
  • 20.
  • 21.
    References Official Docker documentation(http://docs.docker.com/) DockerCheat Sheet(https://github.com/wsargent/docker-cheat-sheet) Docker Use cases - Article(http://blogs.gartner.com/richard-watson/ok-get-dockers-great/) Linux Containers(https://linuxcontainers.org/) Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition, Jérôme Petazzoni(http://www.slideshare.net/jpetazzo/introduction-to-docker-december-2014-tour-de-france-bordeaux-special-edition) Official hosted registry https://hub.docker.com/(https://hub.docker.com/)
  • 22.
    Thank you Orest Ivasiv Softwareengineer, Softserve Docker hobbyist halyph@gmail.com(mailto:halyph@gmail.com) http://halyph.com(http://halyph.com) @halyph(http://twitter.com/halyph)