the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
regardless of kernel version – regardless of host distro • (but container and host distro must match*) • run anything – if it can run on the host, it can run in the container – i,e., if it can run on a Linux kernel, it can run *Unless you emulate CPU with QEMU and binfmt
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
run straight on the host • CPU performance – equal to native performance • Memory performance – small overhead for (optional) accounting • Network performance – small overhead, can be reduced to zero
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
$> docker run busybox rm /etc/passwd • The file is still there ?? $> docker run busybox cat /etc/passwd • Commit the changes $> docker ps –n=2 #get the container’s id $> docker commit <id> broken-busybox • The file is gone $> docker run broken-busybox cat /etc/passwd
the public index $> docker search apache $> docker pull creack/apache2 • Run the image and check the ports $> docker run –d creack/apache2 $> docker ps • Expose public ports $> docker run –d –p 8888:80 –p 4444:443 creack/apache2 $> docker ps
Dockerfile # Memcache FROM UBUNTU MAINTAINER Victor Vieux <[email protected]> RUN apt-get update RUN apt-get install memcached –y ENTRYPOINT [“memcached”] USER daemon EXPOSE 11211 • Build the image $> docker build –t vieux/memcached • Start the image $> docker run –d vieux/memcached # Memcache FROM UBUNTU:12.10 MAINTAINER Victor Vieux <[email protected]> RUN apt-get update RUN apt-get install memcached –y ENTRYPOINT [“memcached”] USER daemon EXPOSE 11211
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
• Docker uses the namespace to know where to push, if the namespace is an url, it will push on this url #push <image> in the namespace <namespace> to the index $> docker push <namespace>/<name> #push the <name> to your a private registry <url> $> docker push <url>/<name> • Same mechanism for docker pull
new name to the busybox image $> docker tag busybox my.registry.com:5000/busybox # Push the image to your registry $> docker push my.registry.com:5000/busybox
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
local $> docker build –t=app . • Test local $> docker run –p 49200:8000 app http://localhost:49200 • Change some files • Rebuild & test $> docker build –t=app . $> docker run –p 49200:8000 app
it $> docker tag app registry.vieux.fr/app • Push image to local registry $> docker push registry.vieux.fr/app • On production server, download image $> docker pull registry.vieux.fr/app • Start the new container $> docker run –d registry.vieux.fr/app
the problem ? • What’s a Container ? • Docker 101 • Docker index vs registry & How-To • Demo: Deployment with zero downtime • Docker future • Questions
corner... • Supports AUFS, BTRFS and device-mapper as storage drivers, more to come… (ZFS?, OverlayFS?) • Support our native go implementation and LXC as execution driver, more to come... (systemd-nspawn?) • Stable plugins (as container?) API • Introspection • Image signature