Diving into docker
WikiToLearn India Conference 2017
Amit Kumar Jaiswal
DOCKER JOURNEY FROM MARCH 2013
- >300,000 pulls
- >38,000 github stars
- >1,500 significant contributors
- >300 projects built on top of docker
- UIs, mini-Paas, Remote Desktop, CryptoMiners...
- >2,000's of Dockerized applications
- Memcached, Redis, Node.js, Hadoop, Blockchain...
- >Integration in Jenkins, Travis, Chef, Puppet, Vagrant and OpenStack
WHAT IS DOCKER?
Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.
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
Can run on any Linux system that supports LXC (today).
Docker 1.13.0 release includes support for DEB/RPM builder, Windows Server 2016.
Raspberry pi2 support.
Future plans to support other container tools (lmctfy, etc.)
Possible future support for other operating systems (RedHat 7.3, Antegros)
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.
DOCKER IS A CONTAINER SYSTEM FOR CODE
Docker Key Components
- Docker Hub
DOCKER ELIMINATES THE MATRIX FROM HELL
"I once heard that hypervisors are the living proof of operating system's incompetence"
Glauber Costa/LinuxCon 2012
- 1979-1982 UNIX chroot
- 1998 FreeBSD jail
- 2001 Parallels Virtuozzo
- 2001 Linux-VServer
- 2005 Solaris Containers
- 2005 OpenVZ
- 2008 Linux LXC
Heroku, Joyent, CloudFoundry
- 2013 Docker
PULLING an image
Startup under .5 secless than 5% difference
less than 5% penalty
IMAGES ARE A DAG
With all this virtualization, why do we still manage virtual servers like mainframes?
Modern systems have a ridiculous amount of configuration state (packages, settings, etc.).
We try to manage state with tools like CFEngine, Chef, & Puppet (or via massive amounts of labor).
The current immutable server practice in is to use Chef/Puppet to build OS images and deploy them to a cloud.
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.
Build a uWSGI Container
- 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
THE FUTURE IS EXCITING
Lean base operating systems optimized for containers. (CoreOS)
New operational models:
- Automated routing
- Distributed consensus (Paxos, Raft)
- Service Discovery
- Software Defined Networking
- Distributed scheduling (Mesos)
ONE LAST THING
WANT TO LEARN MORE ABOUT DOCKER??