Download - Docker quick start
![Page 1: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/1.jpg)
Introduction To Docker
Lalatendu MohantyTwitter: @lalatenduM
Software Engineer @Red Hat
![Page 2: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/2.jpg)
What we want?
● Scalability, maintainability, Agility, Portability.● A continuum of abstraction levels.● Improved resource utilization.
![Page 3: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/3.jpg)
Linux Containers
![Page 4: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/4.jpg)
Linux Containers
● Use Linux kernel isolation features to give a VM like environment.
● Docker may be a two years old project, but Linux containers are older than that.
● Docker, Lxc, Rkt, lmctfy
![Page 5: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/5.jpg)
Docker
![Page 6: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/6.jpg)
Introducing Docker
● Sand boxing of process/Application.● Lightweight container virtualization platform.● It is an application packaging and delivery
technology.
![Page 7: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/7.jpg)
Why Docker?
![Page 8: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/8.jpg)
Why Docker?
● I already have virtualization, do I need Docker?– Yes, because it an awesome way of shipping
application.
– It reduces the time , from developing an application to putting it in to production.
– Each Docker container can be an independent entity.
– Different run time for different containers.
![Page 9: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/9.jpg)
Docker Vs Virtualization
● Lighter than Virtual machines.● Take less time to start● We can run a ton of processes on a reasonably
sized host● Deploying and scaling relatively easy.● “Dockerized” apps are completely portable.
![Page 10: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/10.jpg)
Technologies Behind Docker
● Control groups– It is a Linux kernel feature.
– allocate resources i.e. CPU time, system memory, network bandwidth, or combinations of these resources to a process/ processes.
● Union file systems– layered file system, so you can have a read only part,
and a write part, and merge those together.
– E.g. : AUFS, btrfs, vfs, and DeviceMapper
![Page 11: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/11.jpg)
Technologies Behind Docker
● Namespaces– It helps to create isolated workspace.
– When you run a container, Docker creates a set of namespaces for that container.
● Selinux– SELinux provides secure separation of containers
by applying SELinux policy and labels
● There are some more ....
![Page 12: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/12.jpg)
![Page 13: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/13.jpg)
Docker Components
● Image– It is a template which is used to launch containers.
● Container– It is like a directory. A Docker container holds
everything that is needed for an application to run.
![Page 14: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/14.jpg)
Docker Components
● Registry– It stores and serves up the actual image assets,
and it delegates authentication to the index.
● Repository– A registry holds a collection of named repositories,
which themselves are a collection of images tracked by GUIDs.
![Page 15: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/15.jpg)
Demo
● Install docker RPM– $yum install docker-io
● Start the docker demon– $systemctl start docker
● Enable docker service. So that, it automatically start after reboot– $systemctl enable docker
● For details about installation, check : http://docs.docker.com/installation/fedora/
![Page 16: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/16.jpg)
● #Search an image– $docker search name
● #Download an image– $docker pull fedora
● #List images– $docker images
● #Run image. – $docker run -t -i fedora /bin/bash
![Page 17: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/17.jpg)
● #Stop a container– $docker stop <ID/Name>
● #kill a container– $docker kill container_name
● #Run a script inside a container● #Save the change
– $docker diff ID/name
– $docker commit -m lalatendu -a testscript 7f28a2303254 centos7:test_container
● #Remove the image– $docker rmi image_name
● #Remove the container– $docker rm container_name
![Page 18: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/18.jpg)
This slide is available at : http://www.slideshare.net/then4way/docker-quick-start
![Page 19: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/19.jpg)
Get involved
● https://github.com/docker● https://github.com/coreos● https://github.com/projectatomic
![Page 20: Docker quick start](https://reader035.vdocuments.us/reader035/viewer/2022071905/55c87d78bb61ebcf6c8b45b0/html5/thumbnails/20.jpg)
Thank You :-)Any questions please?