+ All Categories
Home > Engineering > Docker Workshop

Docker Workshop

Date post: 13-Apr-2017
Category:
Upload: ahmad-rafiee
View: 98 times
Download: 0 times
Share this document with a friend
28
Docker Workshop [email protected] Ahmad Rafiee
Transcript
Page 1: Docker Workshop

Docker Workshop

[email protected] Rafiee

Page 2: Docker Workshop

Linux Containers

An operating system–level virtualization method for running multiple isolated Linux systems (containers) on a single control host.

Page 3: Docker Workshop

Linux Kernel Features used by Linux Containers

• Namespaces• (mnt, pid, net, ipc, uts/hostname, user ids)

• cgroups• (cpu, memory, disk, i/o - resource management)

• AppArmor, SELinux• (security/access control)

• seccomp• (computation isolation)

• chroot• (file system isolation)

Page 4: Docker Workshop

What is Docker?

Page 5: Docker Workshop

Linux Containers: Docker• A platform for managing Linux Containers• Began as an open-source implementation of the deployment

engine which powers dot Cloud• Started in March, 2013• Provided an easy to use API and powerful• container image management features• Attracted the community very fast• Go programming language

Page 6: Docker Workshop

What is Docker?

• Platform to help code, test and deploy applications• Open platform for developers and sysadmins to build,

ship, and run distributed applications.• Light weight containers• Available on most Linux distros• Platform to help code, test and deploy applications

Page 7: Docker Workshop

Why Docker?• Ship More Software Faster• Minimal overhead/resource usage• Run thousands of containers• Easy to run your whole production stack locally• Simply share your application with others• Faster delivery of your applications• Deploying and scaling more easily• Fully Automated, Easy To Deploy, Quickly Scale• Run more apps on one host machine• Application portability

Page 8: Docker Workshop

Time to Provision:

•Bare metal: 8 to 24 Hours•Cloud VM: 5 to 10 Minutes•Container: 5 to 15 Seconds

Page 9: Docker Workshop

Containers vs. VMs

Virtual Machines Containers

Page 10: Docker Workshop
Page 11: Docker Workshop

Docker Architecture

Page 12: Docker Workshop

Docker Architecture

Page 13: Docker Workshop

Docker Workflows

Page 14: Docker Workshop

Docker Workflows

Page 15: Docker Workshop

Docker Installation• Native installation for Linux• Docker Toolbox for Mac and Windows• https://www.docker.com/toolbox• All-in-one Docker installation• Docker Engine• Docker Machine• Docker Compose• Kitematic• Docker Swarm

Page 16: Docker Workshop

Docker components

• The Docker Engine• The Docker Client• Docker Image• Docker Registry• Docker Containers

Page 17: Docker Workshop

The Docker Engine

• Docker host, the computer running the Docker Engine.• The daemon managing Docker images and containers.• using namespaces and cgroups• It runs on the (Linux-based) Host

Page 18: Docker Workshop

The Docker Client

The Docker client, in the form of the docker binary, is the primary user interface to Docker. It accepts commands from the user and communicates back and forth with a Docker daemon.

Page 19: Docker Workshop

Images• Read only template used to create containers• Build by you or other docker users• Stored in the docker hub or you local registry• Every image starts from base image

Page 20: Docker Workshop

Containers• Isolated application platform• Containers everything needed to run you application• Based on one or more images• Docker containers launched from Docker image• When Docker container runs, it adds a read-write layer on top

of the image

Page 21: Docker Workshop

Image vs Container• Docker Image is a class• Docker Container is a instance of class

Page 22: Docker Workshop

Docker Tools:• Docker Compose: create and manage multi-container

architectures• Kitematic: Simple application for managing Docker

containers on Mac and Windows• Docker Swarm: orchestrating tool to provision and schedule

containers• Docker Machine: provision hosts and install Docker on them• Virtual Box: Virtualization software to run Docker host for

Mac and Windows

Page 23: Docker Workshop

Dockerfile

•  Dockerfile is instructions to build Docker image• How to run commands• Add files or directories• Create environment variables• What process to run when launching container

• Result from building Dockerfile is Docker image

Page 24: Docker Workshop

Docker Orchestration• Problems with standalone Docker Running a server cluster on

a set of Docker containers, on a single Docker host is vulnerable to single point of failure!

Page 25: Docker Workshop

Docker Swarm

• Native Clustering System• Clustering (management) for Docker.• Manage multiple Docker daemons.• Distribute workloads.

Page 26: Docker Workshop

Docker Compose• Tool for defining and running multi-container• applications with Docker in a single file• Fast, isolated development environments using Docker.• Quick and easy to start.

Page 27: Docker Workshop
Page 28: Docker Workshop

Recommended