22
Introduction to Docker Shailendra Chauhan Microsoft MVP, Technical Consultant and Corporate Trainer

Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

Embed Size (px)

DESCRIPTION

Learn to build modern infrastructure using docker and Kubernetes containers. Develop and deploy your ASP.NET Core application using Docker. Leverage to learn container technology to build your ASP.NET Core application. For More details https://www.dotnettricks.com/training/masters-program/docker-kubernetes-training

Citation preview

Page 1: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Introduction to Docker

Shailendra Chauhan

Microsoft MVP, Technical Consultant and Corporate Trainer

Page 2: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• Multi-Dimensional Evolution of Computing

• What is Container?

• Container Platforms

• Why Containers?

• Virtual Machines vs Containers

• Containers and VMs together

• Docker Basics

• Docker for .NET Applications

• Docker Engine Architecture

Agenda

Page 3: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Evolution of Computing

Page 4: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• A container is a software that contains an application code and all its dependencies.

• Enables an application to run quickly in an isolated environment.

• Provide smooth migration from one computing environment to another.

• Share the same OS kernel

• Works with all major Linux & Windows Server

What is Container?

Source : www.docker.com

Page 5: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Container Platforms

Linux Containers (LXC) Docker (Docker Swarm) Kubernetes RedHat OpenShift DC/OS

Page 6: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

•Quickly create ready-to-run packaged

applications, low cost deployment

• Automate testing, integration and

packaging

• Reduce/eliminate platform

compatibility issues

• Supports microservices development

Why Containers?

• Improve speed and frequency of releases, reliability of deployments

•Makes app lifecycle efficient, consistent and repeatable-configure once, run many times

• Eliminate environment inconsistencies between dev, test, and production

• Provide Scalability on demand

For Developers For Administrator

Page 7: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Virtual Machines vs. Containers

VMs

Source : www.docker.com

Containers

Source : www.docker.com

Page 8: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• Hardware-level virtualization

• Fully isolated

• Isolated OS

• Having its own kernel

• Slower in start-up

• Many startup process

• Upfront resource allocation

Virtual Machine vs. Containers

• OS-level virtualization

• Process-level isolation

• Isolated processes/filesystems

• Host machine kernel is used

• Faster in start-up

• Single Start-up process

• No upfront resource allocation

Page 9: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Containers and VMs together

Source : www.docker.com

Page 10: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• A light weight, open and secure platform for developing, shipping and running applications using container technology.

• Provides Container solutions for developers, architects, DevOps, and IT People.

• Run on most Linux distributions, Windows and Mac OS.

• Supported by most of cloud providers like AWS, Azure, Google etc.

• Provide Dev/Test, CI and DevOps platform for many use cases.

Introduction to Docker

Page 11: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• Infrastructure Cost Savings

• Standardization and Productivity

• Isolation

• Security

• Makes app lifecycle efficient and consistent

• Continuous Deployment and Testing

• On Demand Scaling

• Multi-Cloud Platforms Support

Docker Benefits

Page 12: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Docker Desktop

• An application for Mac and Windows to build production-ready container applications

• Enables to build and test Linux & Windows based applications at local machine

• Available in two editions:

• Desktop Community

• Desktop Enterprise

Page 13: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Docker For Developers

Applications(.NET Core, Java, JS etc.)

Windows Server

Linux

Page 14: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Docker For .NET Applications

.NET Core

Windows Nano Server

Linux

.NET 3.5 & .NET 4.x Windows Server Core

Legacy Applications

Page 15: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• Docker File

• Docker Image

• Docker Container

• Docker Registry

Docker Basics

Page 16: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Docker File

Dockerfile

docker build

• A simple text file that contains commands to build a docker image.

• This file doesn’t have any extension.

Page 17: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• A lightweight, standalone and executablepackage of software.

• Includes everything which is needed to runan application like code, runtime, systemtools, system libraries and settings.

• An image is stack of multiple read onlylayers referencing another images.

• Created by docker build command.

• Stored in Docker registry (eg. Docker Hub).

Docker Image

Image = Layered File System

Base Image (Ubuntu)

.NET Core SDK

Page 18: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• Container is an running instance of a docker image

• An isolated and secured shipping container

• Run by docker run command

Docker Container

Operating System

Software

Application Code

docker run

Page 19: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• A Service to host Docker images

• Multiple options are available:• Docker Hub - (Free for public images and Paid for private images)

• Docker Trusted Registry - (on-prem or on-cloud)

Docker Registry

Docker Registry

docker push

docker pull

Page 20: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Docker Container Life Cycle

Run

Dockerfile

Build

Docker Registry

PullPush

StopStartRestart

Docker Local Instance

Commit

Page 21: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

• A runtime to build and run container based applications whichcan run anywhere consistently on any infrastructure.

• Runs on various Linux (CentOS, Debian, Fedora, Oracle Linux,RHEL, SUSE, and Ubuntu) and Windows Server OS.

• Provides built in orchestration, container networking, out of thebox security, volume and plugins.

Docker Engine

Page 22: Introduction Docker and Kubernetes | Docker & Kubernetes Tutorial | Dot Net Tricks

For Docker Online Training : +91-999 123 502

Server Daemon

Docker Engine Architecture

Volumes

Images

Networks

Plugins

R

E

S

T

A

P

I

Docker CLI

Docker Engine

Containers