from zero to hero with running your asp.net core 1 application in a docker container

Post on 16-Apr-2017

764 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

From zero to hero

Running your ASP.NET Core application in a Docker container

Maurice de Beijer @mauricedb

Who am I?

• Maurice de Beijer• The Problem Solver• Microsoft Azure MVP• Freelance developer/instructor• Twitter: @mauricedb• Web:http://www.TheProblemSolver.nl• E-mail: maurice.de.beijer@gmail.com

Overview

• What are containers• Why use container technology?• What is Docker• Creating and running Docker images• Running an ASP.NET Core App in a Docker

container• But we need more

What is a container?

Once upon a ship

Loading cargo the old way

A container ship these days

Loading is a bit faster

Running virtual machines

Virtual Machines vs Containers

NamespacesCgroupsUnion file system

What is Docker?

Docker Hub

Why use Docker?

• Package an application with it’s dependencies• Dev environment behaves exactly like production• Less overhead means more deployments on a server• Deploy the same container in different clouds• Not just for cloud computing• Docker has standardized container formats• It’s open source

Some other Docker Use Cases

• Simulate deployed environment during development– Each container simulates a machine

• Share containers between developers– Database containers with sample data• Also use in the (automated) QA environment

– Build containers with compilers and libraries• Also use in the CI environment

Build

ing

cont

aine

rs

Useful docker image commands

• docker images• docker pull <image name>• docker build –t <image name> <folder>• docker run <image name>• docker rmi <image id>• docker rmi $(docker images -q -f dangling=true)

Useful docker container commands

• Docker ps• docker logs <container name>• docker stop <container name>• docker start <container name>• docker kill <container id>• docker rm <container id>• docker rm $(docker ps -a -q)

Orchestration

Dock

er C

ompo

se

The

min

imal

Doc

kerfi

le

ASP.

NET

Cor

e 1.

0 Ap

pon

Lin

ux

Dock

er o

n W

indo

ws

Containers can be great…

…with the right tools!

Maurice de Beijer - @mauricedb

top related