Containers/Docker
Mirna Alaisami Matthias Haeussler
Containers/Docker Mirna Alaisami Matthias Haeussler What is a - - PowerPoint PPT Presentation
Containers/Docker Mirna Alaisami Matthias Haeussler What is a container? in general 2 What is a Container? "in General" The term comes originally from the transportation world! A shipping container is any
Mirna Alaisami Matthias Haeussler
2
3
transportation world!
receptacle or enclosure for holding goods, so that it can be moved from
its content.
[2]
the same time a kind of liquid. How can we ship them together without having the danger that the liquid may ruin the documents?
be handled the same anywhere in the world), load the documents in one of them and the liquid in the other, lock the containers, and ship them next to each other with isolating their content and protecting it from being damaged or lost, using any transportation mode!
5 [3] [4]
6 [5]
7
8
9 [6]
10 [7]
11 [8]
13
to a shipping container in its purpose!
software along with everything that is needed to make it work.
container is an isolated working environment for an application, containing all the necessary dependencies, libraries, binaries and configurations needed for the application to run seamlessly.
[9]
which are running isolated from other processes on the system, using the chroot system call and some Linux kernel features such as cgroups and namespaces:
− A chroot system call changes the root directory of a process and its children to a new location in the filesystem. − A namespace wraps the system objects (processes, networking, filesystems, and user ID components) in an abstraction that limits the visibility an object has on other
what is in the same namespace.
−
A cgroup (Control group) limits the usage of resources (CPU, memory, disk, I/O) for a group of processes or containers.
15
17
App Java EE
„App Server“
App Java EE
„App Server“
DB jar readme + Dev Ops
DevOps Problem
Infrastructure Infrastructure
“Dev” “Prod”
Config
“Lightweight”
[10]
18
App Java EE
„App Server“
App Java EE
„App Server“
DB jar readme + Dev Ops
Infrastructure Infrastructure
“Dev” “Prod”
Config
“Lightweight”
[10]
“Containers”
Node Container Engine Node Container Engine Node Node
19 [11]
▪ Container − Begin lifecycle using an image − Running instance of an image − Many containers can be run off the same image
21
▪ Container Image − Never started, never “running” − Blueprint of a container (Inert file, that’s the base on which you instantiate containers) − Ensure reusability of containers
App Runtime-dependency
Container Image Containers Run
22
Ubuntu JVM App „immutable“ Image-name:v1
23
Ubuntu JVM App „immutable“ Image-name:v1 docker run Ubuntu JVM App
Docker Daemon mkdir /tmp create file
ssh
24
Ubuntu JVM App „immutable“ Image-name:v1 docker run Ubuntu JVM App
Docker Daemon mkdir /tmp create file
ssh docker commit Ubuntu JVM App /tmp „immutable“ Image-name:v2
26
1979 2000-2005 2006 2008 2011-2013 2013 2013-2018
chroot Implementation of chroot system call in Unix V7 Enables separation of the file system for individual processes Process Containers, later: cgroups Implementation of cgroups in Linux- Kernel by Google Limiting, accounting and isolating resource usage CF Warden, LMCTFY Container Runtimes of CloudFoundry / Google Slow increase in interest in containers Google/LMCTFY concepts still used today rkt, runC, Kubernetes Competition with Docker with e.g. rkt Release of container tools like Kubernetes FreeBSD Jails, Linux VServer, Solaris Container, OpenVZ Virtualization and isolation in subsystems Required a lot of configuration and some kernel patches LXC The first, most complete implementation
Implementation without Kernel-Patches A lot of Configuration Baseline for actual Runtimes Docker Release of Docker Platform as open source Significant for the development of the technology Easy handling and management of containers
28
support from the cloud community but also commercially:
− Linux-based docker (based
− Windows-based docker (cgroups and namespaces are represented differently).
[17]
30
community
infrastructure tools
[18]
32
storing and discovery of Docker images and automating workflows.
repositories:
[19]
34
background process (the dockerd command) that manages Docker images, containers, networks, and storage volumes. It constantly listens for Docker API requests and processes them (the dockerd command).
applications to interact with the Docker
HTTP client.
interface (CLI) client (the docker command) for interacting with the Docker daemon.
manages manages manages manages
[21]
36
Docker Client
Remote API CLI
OR
[22] [23]
37
Docker Client Docker Host
CLI
OR Containers Images Docker Daemon
Remote API
38
Docker Client Docker Host Registry
CLI
OR Containers Images Docker Daemon
Remote API
39
Docker Client Docker Host Registry
CLI
OR Containers Images Docker Daemon
(1) (1) Dockerfile
Build (1)
(1)
Dowload Base Image (1)
Remote API
40
Docker Client Docker Host Registry
CLI
OR Containers Images Docker Daemon
(1) (1) (2) (2) Dockerfile
Push (2) Build (1)
(1)
Dowload Base Image (1)
Remote API
41
Docker Client Docker Host Registry
CLI
OR Containers Images Docker Daemon
Not Found Locally? (3) Get From Registry (3)
(1) (1) (2) (2) (3) (3) Dockerfile
Push (2) Build (1) Pull (3)
(3) (1)
Dowload Base Image (1)
Remote API
42
Docker Client Docker Host Registry
Remote API CLI
OR Containers Images Docker Daemon
Run (4) Found Locally? (4) „Start Container“ (4)
(1) (1) (2) (2)
Push (2) Build (1) Pull (3) Not Found Locally? (3) Get From Registry (3)
(3) (3) (4) (4) (4) Dockerfile (3) (1)
Dowload Base Image (1)
1. https://regmedia.co.uk/2017/09/11/shutterstock_containers_in_port.jpg?x=1200&y=794 2. https://i.ytimg.com/vi/XbF-MBr0Vlk/maxresdefault.jpg 3. https://www.shareicon.net/document-file-documents-archive-interface-files-files-and-folders-817212 4. https://www.deviantart.com/thepow/art/Chemistry-Flasks-322657766 5. http://multiboxx.com/ 6. https://fr.pngtree.com/freepng/vector-maritime-transport_1639584.html 7. https://rfclipart.com/image/big/3f-89-52/cargo-container-train-with-diesel-locomotive-Download-Royalty-free- Vector-File-EPS-211474.jpg 8. https://previews.123rf.com/images/leshkasmok/leshkasmok1511/leshkasmok151100178/49155728-trasporto- aereo-di-concetto-di-trasporto-appartamento-stile-illustrazione-concetto-di-logistica-pu%C3%B2-ess.jpg 9. https://blog.risingstack.com/operating-system-containers-vs-application-containers/ 10. https://us.123rf.com/450wm/ylivdesign/ylivdesign1701/ylivdesign170101181/68586484-laptop-icon-isometric- 3d-style.jpg?ver=6 11. https://medium.com/tech-tajawal/devops-in-a-scaling-environment-9d5416ecb928
44
leap-15/
Terminal-icon.png
45
logo.jpg?resize=262%2C285
https://expandedramblings.com/index.php/paypal-statistics/
http://techgenix.com/containers-success-stories/
https://www.docker.com/customers/expedia
46
Novatec Consulting GmbH
Dieselstraße 18/1 D-70771 Leinfelden-Echterdingen
info@novatec-gmbh.de www.novatec-gmbh.de
Senior Consultant
Matthias Haeussler
Matthias.haeussler@novatec-gmbh.de Consultant
Mirna Alaisami
Mirna.Alaisami@novatec-gmbh.de