Presentation about docker from Java User Group in Ostrava CZ (23th of November 2015). Presented by Martin Damovsky (@damovsky).
Demos are available at https://github.com/damovsky/jug-ostrava-docker
2. My plan for today
• Introduction to Docker
• Some demos
• Docker in Cloud
• IoT and Docker
• News from DockerCon 2015 in SF and Barcelona
• Discussion + Beer
3. Who am I?
• Software engineer (java, DBs, continuous integrations, docker, etc.)
• Grew up in Orlová - near Ostrava !!!
• VŠB TU Ostrava, Tieto Czech s.r.o. Ostrava, Gemalto in Prague
• Now in Vendavo CZ in Prague
• Twitter @damovsky
5. What is ?
Docker is an open platform for developing, shipping, and running
applications. Docker is designed to deliver your applications faster.
With Docker you can separate your applications from your
infrastructure AND treat your infrastructure like a managed application.
Docker helps you ship code faster, test faster, deploy faster, and shorten
the cycle between writing code and running code.
6. What is ?...my version
• Docker is new way of virtualization
• you virtualize only the app and not the whole OS
• + dozen of tools for container sharing, running, orchestrations, etc.
• it’s a whole platform for using containers
7. Docker project
• Docker inc. is a sponsor of “Docker” open source project
• https://github.com/docker/docker
• Written in Go
• Main contributors: Docker team, RedHat, IBM, Google, Cisco…
• Initial release: 13 March 2013
• Operation system: Linux
• www.docker.com
10. How does it works?
• Use kernel support for isolation (CPU, memory, I/O, network….)
• Cgroups – linux kernel feature to limit resource usages
• Namespaces – linux kernel feature to isolate services from each other
• Earlier LXC – https://linuxcontainers.org
• Now – runC (Libcontainer) https://github.com/opencontainers/runc
12. Docker Container and its file system layers
Base Image (debian/ubuntu/busybox…)
Image – Added Apache
Writable Layer
13. Docker Container and its file system layers
Base Image (debian/ubuntu/busybox…)
Image – Added
Apache
Writable Layer
Image – Added
MySQL
Writable Layer
Container #1 Container #2
14. Docker motto
Build – build container with your app
Ship - use docker registry to distribute your app
Run - wherever docker runs, your app will run as
well
15. Build – use Dockerfile
• Recipe for building the image
• Easy to transfer copy&paste
• versioning in git, etc..
FROM debian:wheezy
RUN apt-get update
RUN apt-get install -y python2.7
CMD python2.7 -m SimpleHTTPServer 8000
31. J2EE Application in Docker - demo
• https://github.com/mgreau/docker4dev-tennistour-app
32.
33. Docker and IoT (Raspberry Pi)
• ARM vs x86/64 architecture
• Docker to plan official support ARM
• HypriotOS – linux distro for Raspberry
• Hypriot OS based images:
• https://hub.docker.com/u/hypriot/
34. RPI + Docker
• LIVE DEMO – hypriot OS httpd
• https://vimeo.com/131966874
35. DockerCon 2015 Challenge
• How many containers could really be started on PI 2?
• http://www.slideshare.net/Docker/docker-online-meetup-27-
raspberry-pi-dockercon-challenge
36. Docker in Cloud
• Digital Ocean
• UI Tutum.co – worth to try!
• Amazon
• Microsoft Azure
• Google Cloud
37. $ Price $
• Digital Ocean: $5 / 512 MB, 1 core, 20 GB SSD, 1TB Transfer
• Amazon: ?
• Microsoft Azure
• Google Cloud: free up to 5 nodes, 6+ nodes $0.15 HR/Cluster
• Alternative: VSPFree.cz 4GB RAM, 8 cores, 900 Kč /3 Months
40. Docker and Microsoft ?
• Microsoft contributes to docker
• see pull request https://github.com/docker/docker/pull/9113
• Microsoft Azure supports docker
• Native Docker on Windows Server
• Demo ASP.NET in Docker
49. Docker Registry - Image Repository
• Public – no way for 99,9% apps
• Private
• Limitation – money & your internet connection speed
• Local repo - can require some management
• Authentication (users/passwords/roles, etc…)
• cleaning olds images
• disk space
• backup (!!!!)
51. Unrealistic tutorials and demos
• Demos = “wow effect”
• Typical problem for production use – database in container
• Database container can really be big! (>10 GB or more)
• Data should be outside of container and backuped
• Virtualization decreases the performance
52. Run Docker on dedicated machine only
• You should use the latest Linux Kernel
• Some bug fixes may require you to update Linux Kernel
• Who can update Linux kernel in production?
• Which file system to use? BTRFS / AUFS / ?
• Which OS ?
• Core OS
• RancherOS
• Well known like a CentOS, Red Hat, Ubuntu ?
• $$$ = MAIN PROBLEM
53.
54. Many thanks to…
• Vendavo CZ for helping me with my presentation!
• And for supporting our “after party”
• Tieto CZ for JUG Ostrava organization!
• @VitekTajzich for his talk about Yowie
55. Links:
• My demos
• https://github.com/damovsky/jug-ostrava-docker
• Yowie – Open source project presented by @VitekTajzich
• https://github.com/vendavo/yowie