Presentation is loading. Please wait.

Presentation is loading. Please wait.

ASP.NET in Linux and Windows containers

Similar presentations


Presentation on theme: "ASP.NET in Linux and Windows containers"— Presentation transcript:

1 ASP.NET in Linux and Windows containers
9/7/2018 8:54 PM ASP.NET in Linux and Windows containers Rob Richardson @rob_rich © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 About Rob Richardson 9/7/2018 8:54 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3 What is Docker Docker is an ecosystem around Container Virtualization
9/7/2018 8:54 PM What is Docker Docker is an ecosystem around Container Virtualization What are Containers? Light-weight kernel virtualization What is Docker? A suite of command-line tools for creating, running, and managing containers © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 9/7/2018 8:54 PM Containers vs. VMs source:  © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Containers Containers virtualize and share the host kernel
9/7/2018 8:54 PM Containers Containers virtualize and share the host kernel Containers must run on the kernel for which they were built: Linux containers run on a Linux host Windows Server Core Windows Nano Server © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 9/7/2018 8:54 PM Host Docker in a VM source:  © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 ASP.NET Core source:

8 What is ASP.NET Core? Reimagination of .NET for the modern web
9/7/2018 8:54 PM What is ASP.NET Core? Reimagination of .NET for the modern web Open Source with Contributions Cross-platform Remove legacy baggage Command-line tools Dependency Injection is baked in Choose your editors and tools Source: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 ASP.NET Core on Server Reverse-proxy from IIS
9/7/2018 8:54 PM ASP.NET Core on Server Reverse-proxy from IIS install .NET Core Windows Server Hosting bundle Reverse-proxy from Apache or Nginx apt-get install dotnet Self-hosted console app or service © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10 ASP.NET Core on Server Pros: Maximum control Cons:
9/7/2018 8:54 PM ASP.NET Core on Server Pros: Maximum control Cons: Must install build tools on host © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 Docker source:

12 9/7/2018 8:54 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 Benefits of Docker Denser server utilization
9/7/2018 8:54 PM Benefits of Docker Denser server utilization Docker image is a unit of deployment Docker container is a unit of scale Avoid “Works on My Machine” Source: © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 ASP.NET Core on Docker source:

15 Option 1: Production Runtime
9/7/2018 8:54 PM Option 1: Production Runtime Build and publish site outside container Copy content into container Minimal runtime inside the container © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 Demo Docker Production Runtime on Linux
9/7/2018 8:54 PM Demo Docker Production Runtime on Linux Docker Production Runtime on Windows docker-compose.yml © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17 Option 1: Production Runtime
9/7/2018 8:54 PM Option 1: Production Runtime Pros: Smallest image size No build tools in container Cons: Must install build tools on host © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

18 Option 2: Build inside the Container
9/7/2018 8:54 PM Option 2: Build inside the Container Use “SDK” base image Build-time: Command-line build & publish in container Run-time: launch website © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 Demo Build inside the container Run tests in the container
9/7/2018 8:54 PM Demo Build inside the container Run tests in the container Spin up dependent resources © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20 Option 2: Build inside the Container
9/7/2018 8:54 PM Option 2: Build inside the Container Pros: More consistent build Run this from the build server Cons: Image size is larger Image includes build tools © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 Option 3: Multi-stage Build
9/7/2018 8:54 PM Option 3: Multi-stage Build Use “SDK” base image Build-time: Command-line build & publish Use “Runtime” base image Copy in content Run-time: launch website © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 Demo Multi-stage build 9/7/2018 8:54 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 Option 3: Multi-stage Build
9/7/2018 8:54 PM Option 3: Multi-stage Build Pros: Smaller deployment image Consistent build Cons: Intermediate container left-overs Publishing test assets © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

24 Option 4: Development Time
Volume maps source code into container Warning: don't deploy this, it doesn't have the content in it © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

25 9/7/2018 8:54 PM Demo Volumes © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

26 Option 4: Development Time
Pros: Very fast iteration loop Cons: Dev container is empty Prod container may be different © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 Option 5: Debugging Remote debugging tools in container
9/7/2018 8:54 PM Option 5: Debugging Remote debugging tools in container IDE attaches to container’s process © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

28 Demo Debugging Containers 9/7/2018 8:54 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

29 Option 5: Debugging Pros: “Native” debugging experience Cons:
9/7/2018 8:54 PM Option 5: Debugging Pros: “Native” debugging experience Cons: Dev container is big Prod container may be different © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 Everything so far is command-line
9/7/2018 8:54 PM Docker and ASP.NET Everything so far is command-line Identical no matter your OS / IDE choices © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

31 Option Unicorn: Visual Studio
9/7/2018 8:54 PM Option Unicorn: Visual Studio Visual Studio Tools for Docker “Native” debugging experience Debug across processes / containers © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

32 Demo Visual Studio tools for Docker 9/7/2018 8:54 PM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

33 Option Unicorn: Visual Studio
9/7/2018 8:54 PM Option Unicorn: Visual Studio Pros: “Native” debugging experience Debug all sites at once Cons: Unusual commands in Dockerfile and docker-compose.yml CI build integration is weird No edit-and-continue © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

34 Docker and ASP.NET Options
9/7/2018 8:54 PM Docker and ASP.NET Options Build outside the container Build inside the container Multi-stage Docker build Development containers Debugging Visual Studio Integration < Best for low-tech developers < Best for Production CI build < Best cross platform in any IDE < Best debugging experience © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35 ASP.NET & Docker Denser server utilization
9/7/2018 8:54 PM ASP.NET & Docker Denser server utilization Docker image is a unit of deployment Docker container is a unit of scale Avoid “Works on My Machine” © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

36 Questions? @rob_rich source:

37 Please evaluate this session Your feedback is important to us!
9/7/2018 8:54 PM Please evaluate this session Your feedback is important to us! The slide will be replaced onsite through Silver Fox Productions with an updated QR code. This slide is required. Do NOT delete or alter the slide. From your PC or Tablet visit MyIgnite at From your phone download and use the Ignite Mobile App by scanning the QR code above or visiting © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

38 9/7/2018 8:54 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "ASP.NET in Linux and Windows containers"

Similar presentations


Ads by Google