Top Banner
Docker core concepts Piotr Hajder AGH University of Science and Technology
18

Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Jul 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Docker core conceptsPiotr Hajder

AGH University of Science and Technology

Page 2: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Why to know dockerUsecases

Page 3: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

DevOps process

Page 4: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

DevOps process with docker

Page 5: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Microservices

https://hackernoon.com/how-microservices-saved-the-internet-30cd4b9c6230

Page 6: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Kubernetes

https://platform9.com/blog/kubernetes-enterprise-chapter-2-kubernetes-architecture-concepts/

Page 7: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Further usecases

https://www.docker.com/why-docker

https://www.infoworld.com/article/3310941/why-you-should-use-docker-and-containers.html

https://www.linode.com/docs/applications/containers/when-and-why-to-use-docker/

Page 8: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Docker in a nutshellCore concepts

Page 9: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

What is docker

Docker is a set of platform as a service (PaaS)products that uses OS-level virtualization to deliversoftware in packages called containers. Containersare isolated from one another and bundle their ownsoftware, libraries and configuration files; they cancommunicate with each other through well-definedchannels. All containers are run by a single operatingsystem kernel and therefore use fewer resources thanvirtual machines.

https://en.wikipedia.org/wiki/Docker_(software)

Page 10: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Virtualization levels vs Docker

OS-level virtualization

Shares host kernel

Shares hardware

Faster than HAL

https://www.researchgate.net/publication/326683646_Implementation_levels_of_virtualization_and_security_issues_in_cloud_computing

Page 11: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Container vs VM

Container VM

https://www.docker.com/resources/what-container

Page 12: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Networking in docker

https://docs.docker.com/config/containers/container-networking/

Page 13: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Security concerns in docker

https://www.oreilly.com/content/five-security-concerns-when-using-docker/

https://docs.docker.com/engine/security/security/

https://www.cimcor.com/blog/the-top-5-security-risks-in-docker-container-deployment

Kernel threats Image threats

Page 14: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Terminology

Docker client – docker command, used for communication with docker server

Docker server – dockerd command, builds and launches containers via client

Image – docker images consist of one or more filesystem layer. Single image can be copied to numerous hosts. Consists of name and tag.

Container – initiated from image. A specific container can exist only once. However, you can create multiple containers from the same image.

Page 15: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Docker in OS Container is a lightweight wrapper around a single

Unix process

Dockerd can run natively only with Linux kernel

On other systems, virtual machine is used to emulate docker environment

Page 16: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Other container build tools

Podman: https://github.com/containers/libpod

Kubler: https://github.com/edannenberg/kubler

Page 17: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Dockerfile structure

https://docs.docker.com/engine/reference/builder/

Page 18: Introduction to docker v1home.agh.edu.pl/~phajder/2020_IS_ASK/docker-basics.pdfMicrosoft PowerPoint - Introduction to docker v1 Author: phajder Created Date: 5/18/2020 10:12:50 AM

Task

REST API connects to Database

Fetch all data from single table

Send response as JSON

Run both API and Database in docker

Use docker-compose