integration with docker and .net core

24
Sponsored & Brought to you by Integration with Docker and .NET Core Elton Stoneman https://twitter.com/eltonstoneman https://www.linkedin.com/in/eltonstoneman

Upload: sriram-hariharan

Post on 28-Jan-2018

6.241 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Integration with Docker and .NET Core

Sponsored & Brought to you by

Integration with Docker and .NET Core

Elton Stoneman

https://twitter.com/eltonstoneman

https://www.linkedin.com/in/eltonstoneman

Page 2: Integration with Docker and .NET Core

Integration with Docker and .NET Core

Elton Stoneman

blog.sixeyed.com

@EltonStoneman

&

Page 3: Integration with Docker and .NET Core

OVERVIEW

• Docker: The Next Model of

Compute

• Why Docker?

• Docker for Integration

• .NET Core

• Running .NET in Docker

• Docker Compose

• Docker and Windows

OS

CoreCLR

App Code

Page 4: Integration with Docker and .NET Core

DOCKER: THE NEXT MODEL OF COMPUTE

OS

Page 5: Integration with Docker and .NET Core

DOCKER: THE NEXT MODEL OF COMPUTE

Isolation

vs.

UtilisationOS OS

Page 6: Integration with Docker and .NET Core

DOCKER: THE NEXT MODEL OF COMPUTE

Isolation

vs.

Utilisation

OS

OS

HyperVisor

Page 7: Integration with Docker and .NET Core

DOCKER: THE NEXT MODEL OF COMPUTE

Isolation

vs.

Utilisation

OS

OS

Page 8: Integration with Docker and .NET Core

DOCKER: THE NEXT MODEL OF COMPUTE

1x app

10x VMs

100x containers

Page 9: Integration with Docker and .NET Core

WHY DOCKER?

Dockerfile encapsulation

Built images

Shared image repository

Rich ecosystem

FROM sixeyed/coreclr-base:1.0.0-rc1-update1

MAINTAINER Elton Stoneman <[email protected]>

# ensure the expected DNX is available

ENV PATH /root/.dnx/runtimes/dnx-coreclr-linux-x64.1.0.0-rc1-update1/bin:$PATH

# deploy the app

COPY /Sixeyed.Docker.WebApp /opt/sixeyed-dotnet

RUN cd /opt/sixeyed-dotnet && dnu restoreac

CMD cd /opt/sixeyed-dotnet/src/Sixeyed.Docker.ConsoleApp && dnx run

Self-contained

Repeatable

Scalable

Page 10: Integration with Docker and .NET Core

DOCKER FOR INTEGRATION

Page 11: Integration with Docker and .NET Core

DOCKER FOR INTEGRATION

v1

Containerize dependencies

Page 12: Integration with Docker and .NET Core

DOCKER FOR INTEGRATION

v2

Containerize whole solution

Page 13: Integration with Docker and .NET Core

DEMO: DEPENDENCIES IN DOCKER

Page 14: Integration with Docker and .NET Core

DOCKER FOR INTEGRATION

Public images

Docker Hub

docker run

Page 15: Integration with Docker and .NET Core

.NET Framework

.NET CORE

Not a full .NET runtime

.NET contains WCF, WPF etc.

Monolithic framework

Windows platforms

Legacy supportBCL

FCL

All-in-one

~50 MBFull

install

Syste

m.L

inq

Syste

m.T

ext.

Encodin

g

Page 16: Integration with Docker and .NET Core

.NET Core

.NET CORE

Cross-platform .NET runtime

Built for ASP.NET 5

Console apps too

NuGet integral

Fx split into packagesCoreCLR

CoreFX

>100 Packages~00s KB

Binary copy

Syste

m.L

inq

Syste

m.T

ext.

Encodin

g

Page 17: Integration with Docker and .NET Core

.NET CORE

OS

CoreCLR

App Code

Page 18: Integration with Docker and .NET Core

DEMO: .NET CORE IN DOCKER

Page 19: Integration with Docker and .NET Core

DOCKER COMPOSE

Grouping multiple containers

Self-contained definition

Versioned container images

Encapsulates configuration

Isolates solution

Enables scale

Page 20: Integration with Docker and .NET Core

DEMO: DOCKER COMPOSE

Page 21: Integration with Docker and .NET Core

DOCKER AND WINDOWS

Windows Server 2016

Natively run Docker containers

Even from Linux images

Windows Server Nano

Base Docker image

Minimal Windows footprint

Page 22: Integration with Docker and .NET Core

DOCKER AND WINDOWS

Windows Server 2016

Natively run Docker containers

Even from Linux images

Windows Server Nano

Base Docker image

Minimal Windows footprint

Page 23: Integration with Docker and .NET Core

DOCKER AND WINDOWS

Windows Server 2016

Natively run Docker containers

Even from Linux images

Windows Server Nano

Base Docker image

Minimal Windows footprint

Page 24: Integration with Docker and .NET Core

THANK YOU

@EltonStoneman

blog.sixeyed.com

https://www.pluralsight.com/courses/ubuntu-getting-started