Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Introduction to Docker

Introduction to Docker

Introduction to docker with examples.

Presented to the STL Docker meetup.

Steven Borrelli

January 08, 2014
Tweet

More Decks by Steven Borrelli

Other Decks in Technology

Transcript

  1. INTRODUCTION TO DOCKER ST. LOUIS DOCKER MEETUP ! JANUARY 8,

    2013 Steven Borrelli [email protected] @stevendborrelli {github, twitter}
  2. STL Machine Learning ! ! Anupam Basu: Visualizing Shakespeare !

    Wednesday, January 22, 2014 Jeremy Kohler: Using GIS in Investigative Reporting Tuesday, February 18, 2014 Jeff Heaton: Neural Networks Wednesday March 19, 2014
  3. DOCKER HISTORY A dotCloud (PAAS provider) project
 Initial commit January

    18, 2013 Docker 0.1.0 released March 25, 2013 
 
 8,800+ github stars, 1,200+ forks
  4. WHAT IS DOCKER? ! “Docker is an open-source project to

    easily create lightweight, portable, self-sufficient containers from any application.”
  5. LIGHTWEIGHT ! Based on Linux containers Minimal overhead (cpu/io/network) Uses

    layered filesystem to save space (AUFS/LVM) Uses a copy-on-write filesystem to track changes
  6. PORTABLE A Docker container will run on any Linux system

    that supports LXC. Raspberry pi support. Future plans to support other container tools 
 (lmctfy, etc.) Possible future support for other operating systems (Solaris, OSX, Windows?)
  7. SELF-SUFFICIENT A Docker container contains everything it needs to run:

    ! Minimal Base OS Libraries and frameworks Application code ! A docker container should be able to run anywhere that Docker can run.
  8. HARDWARE VIRTUALIZATION 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix

    VirtualPC 1999 VMWare Workstation 2001 IBM AIX LPAR 2002 Xen 2006 Amazon EC2 2007 Sun Logical Domains 2007 Linux KVM 2007 InnoTek VirtualBox 2008 Microsoft Hyper-V
  9. Glauber Costa/LinuxCon 2012 “I once heard that hypervisors are the

    living proof of operating system's incompetence.”
  10. PROCESS VIRTUALIZATION 1979-1982 UNIX Chroot 1998 FreeBSD Jail 2001 Parallels

    Virtuozzo 2001 Linux-VServer 2005 Solaris Zones 2005 OpenVZ 2008 Linux LXC 2007+ PAAS: Heroku, Joyent, CloudFoundry 2013 Docker
  11. MAPPING PORTS Example: run Zookeeper + Exhibitor Host ports will

    be dynamically allocated by docker Port 2181 on host will be mapped to 2181 on container
  12. COMMITTING CHANGES Commit changes to a new image Run the

    new container Make changes to a running container
  13. IMMUTABLE SERVERS Physical server lifetime is measured in years. A

    container's lifetime can only be a few seconds. Treat containers like a build artifact. If you need to make changes, build a new container.
  14. BUILDING AND RUNNING Build node container and and app container

    Run your app, and get the port: https://github.com/stevendborrelli/docker-meetup
  15. SUMMARY Easy to build, run & share containers Rapidly expanding

    ecosystem Better performance vs. VMs Layered filesystem gives us git-like control of images. Reduces complexity of system builds
  16. THE FUTURE IS EXCITING New operational models: Automated routing Distributed

    consensus (Paxos, Raft) Service Discovery Software Defined Networking Distributed scheduling (Mesos)
  17. Q&A