SlideShare a Scribd company logo
Docker for .NET
Developers
Michele Leroux
Bustamante
CIO / Cloud/Security Architect
Solliance
Microsoft Regional Director,
MVP Azure
Docker Captain
@michelebusta
• Microservices
architecture
• Faster releases
• Polyglot
• Improved
development
workflows
• Devops culture
• Better resiliency
Why Docker?
• Run .NET Framework applications in Windows containers
• Limited changes
• Encapsulate configuration and dependencies
• Refactor the monolith at your own pace
• Create new dotnetcore / aspnetcore applications
• Target Linux or Windows containers
• Familiar development experience / debugging
.NET Developer Benefits
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
IIS Dockerfile
Add	windows	features
Add	windows	features
Copy	/	run	an	existing	
executable
ASP.NET 3.5 Dockerfile
Add	required	packages
Configure	IIS	requirements
ASP.NET 4.6.2 Dockerfile
Tailor	added	features	by	
specific	platform
Container Images
https://store.docker.com
Docker for
Windows
Docker for Windows
Powershell
Developer Tools
Docker for Windows
provides a Linux VM for
local execution of
Docker containers.
Linux / Windows
Docker for Windows
provides a Linux VM for
local execution of
Docker containers.
Can verify mode.
Can swap between
modes from the task
tray.
Linux / Windows
Docker for Windows
provides a Linux VM for
local execution of
Docker containers.
Can verify mode.
Can swap between
modes from the task
tray.
Linux / Windows
Docker for Windows
Powershell
Visual Studio 2017
Developer Tools
Development Considerations
• Target environments and base image
• Debugging
• Access to logs
• Service dependencies and networking
• Environment variables
• CICD workflows
Project -> New
with Docker
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", “WebApi.dll"]
Demo Linux
FROM microsoft/aspnetcore:1.1-nanoserver
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", “WebApi.dll"]
Demo Windows
Add Docker
Support
Add Docker to existing
dotnetcore or .NET
Framework projects.
Creates Dockerfile and
Docker project with
compose files ready for
debugging.
Add Docker
services:
webapp:
image: webapp
build:
context: ./src/WebApp
dockerfile: Dockerfile
webapi:
image: webapi
build:
context: ./src/WebApi
dockerfile: Dockerfile
DEMO Add Docker
services:
webapp:
image: webapp
build:
context: ./src/WebApp
dockerfile: Dockerfile
environment:
- "Api:BaseAddress=http://webapi"
DEMO Environment Variables
Migrating
Legacy Apps
FROM microsoft/aspnet
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
DEMO Legacy Migration
services:
snapboard.web:
image: snapboard.web
…
depends_on:
mssql:
condition: service_healthy
mssql:
image: microsoft/mssql-server-windows-developer
…
DEMO Compose Up Developer Love
# Enable DNS resolution to work properly for all windows containers
# instead of caching (temporary fix)
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN set-itemproperty -path
'HKLM:SYSTEMCurrentControlSetServicesDnscacheParameters' -Name
ServerPriorityTimeLimit -Value 0 -Type Dword
# see music store sample
# https://github.com/docker/labs/blob/master/windows/windows-
containers/MultiContainerApp.md
DNS Resolution Reference
FROM microsoft/aspnet
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["powershell", "./bootstrap.ps1"]
Environment Variables and IIS
# copy process environment variables machine-wide
foreach($key in [System.Environment]::GetEnvironmentVariables('Process').Keys) {
if ([System.Environment]::GetEnvironmentVariable($key, 'Machine') -eq $null) {
$value = [System.Environment]::GetEnvironmentVariable($key, 'Process')
[System.Environment]::SetEnvironmentVariable($key, $value, 'Machine')
}
}
Bootstrap.ps1
REFERENCE:	Elton	Stoneman
https://github.com/sixeyed/nerd-dinner/blob/dockerize-part2/docker/web/bootstrap.ps1
CICD
Automating Image Builds (CI)
Git /	
TFS
VSTS
Build
Definition
Registry
Build
Images	
Pull
Latest
Push
Images	
Service	
Image	
Repo
Latest
Version	Info
Repository	tags
Promotion	tags
Commit	/	Checkin
VSTS
Service
Repo
Tagged
Images
Build Definition
Build Output
Azure Container Registry
Deployment (CD)
Git /	
TFS
VSTS
Build
Definition
Registry
Build
Images	
Pull
Latest
Push
Images	
Service	
Image	
Repo
Latest
Version	Info
Repository	tags
Promotion	tags
Commit	/	Checkin
VSTS
Service
Repo
Tagged
Images
Dev
Uat
Uat
Your investment
in .NET will pay
off.
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Thank You!
@docker #dockercon

More Related Content

PDF
Efficient Parallel Testing with Docker by Laura Frank
PPTX
Docker Online Meetup: Announcing Docker CE + EE
PDF
Node.js Rocks in Docker for Dev and Ops
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
PDF
Intro to docker - innovation demo 2022
PPTX
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
PPTX
Structured Container Delivery by Oscar Renalias, Accenture
PDF
DCSF19 How To Build Your Containerization Strategy
Efficient Parallel Testing with Docker by Laura Frank
Docker Online Meetup: Announcing Docker CE + EE
Node.js Rocks in Docker for Dev and Ops
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Intro to docker - innovation demo 2022
Dell Trials and Triumphs using Docker on Client Systems by Sean McGinnis and ...
Structured Container Delivery by Oscar Renalias, Accenture
DCSF19 How To Build Your Containerization Strategy

What's hot (20)

PDF
Docker for developers on mac and windows
PDF
Docker?!?! But I'm a SysAdmin
PPTX
Photon Controller: An Open Source Container Infrastructure Platform from VMware
PDF
DCEU 18: Docker Containers in a Serverless World
PDF
Automated hardware testing using docker for space
PDF
Build & Deploy Multi-Container Applications to AWS
PPTX
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
PDF
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
PDF
DCSF19 Containers for Beginners
PPTX
DockerCon EU 2015: Placing a container on a train at 200mph
PDF
The Tale of Two Deployments: Greenfield and Monolith Apps with Docker Enterpr...
PDF
DockerCon SF 2015: Docker in the New York Times Newsroom
PPTX
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
PDF
Docker on Docker
PDF
Your Auto-Scaling Bot - Volkan Tufecki
PDF
Infinit's Next Generation Key-value Store - Julien Quintard and Quentin Hocqu...
PDF
How to build your containerization strategy
PDF
Taking Docker from Local to Production at Intuit JanJaap Lahpor, Intuit and H...
PDF
Production Ready Containers from IBM and Docker
PDF
Highly Available Persistent Applications in Containers by Kendrick Coleman, E...
Docker for developers on mac and windows
Docker?!?! But I'm a SysAdmin
Photon Controller: An Open Source Container Infrastructure Platform from VMware
DCEU 18: Docker Containers in a Serverless World
Automated hardware testing using docker for space
Build & Deploy Multi-Container Applications to AWS
Reduce DevOps Friction with Docker & Jenkins by Andy Pemberton, Cloudbees
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
DCSF19 Containers for Beginners
DockerCon EU 2015: Placing a container on a train at 200mph
The Tale of Two Deployments: Greenfield and Monolith Apps with Docker Enterpr...
DockerCon SF 2015: Docker in the New York Times Newsroom
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
Docker on Docker
Your Auto-Scaling Bot - Volkan Tufecki
Infinit's Next Generation Key-value Store - Julien Quintard and Quentin Hocqu...
How to build your containerization strategy
Taking Docker from Local to Production at Intuit JanJaap Lahpor, Intuit and H...
Production Ready Containers from IBM and Docker
Highly Available Persistent Applications in Containers by Kendrick Coleman, E...
Ad

Similar to Docker for .NET Developers - Michele Leroux Bustamante, Solliance (20)

PPTX
Docker for a .NET web developer
PPTX
Docker containers on Windows
PPTX
Deploying applications to Windows Server 2016 and Windows Containers
PPTX
20170321 docker with Visual Studio 2017
PDF
Experts Live Europe 2017 - Why you should care about Docker - an introduction
PPTX
Docker for .NET Developers
PPTX
Docker 101
PDF
Docker All The Things - ASP.NET 4.x and Windows Server Containers
PPTX
Architecting .NET Applications for Docker and Container Based Deployments
PPTX
Docker for .NET Developers
PPTX
Docker for .net developer
PPTX
Dockerization of Azure Platform
PPTX
Docker.pptx
PPTX
Docker
PPTX
Micro Services in .NET Core and Docker
PDF
Demystifying Docker
PPTX
Demystifying Docker101
PPTX
Containers: DevOp Enablers of Technical Solutions
PPTX
Docker
PPTX
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker for a .NET web developer
Docker containers on Windows
Deploying applications to Windows Server 2016 and Windows Containers
20170321 docker with Visual Studio 2017
Experts Live Europe 2017 - Why you should care about Docker - an introduction
Docker for .NET Developers
Docker 101
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Architecting .NET Applications for Docker and Container Based Deployments
Docker for .NET Developers
Docker for .net developer
Dockerization of Azure Platform
Docker.pptx
Docker
Micro Services in .NET Core and Docker
Demystifying Docker
Demystifying Docker101
Containers: DevOp Enablers of Technical Solutions
Docker
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Ad

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
PDF
How to Improve Your Image Builds Using Advance Docker Build
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Securing Your Containerized Applications with NGINX
PDF
How To Build and Run Node Apps with Docker and Compose
PDF
Hands-on Helm
PDF
Distributed Deep Learning with Docker at Salesforce
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
PDF
Monitoring in a Microservices World
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
PDF
Predicting Space Weather with Docker
PDF
Become a Docker Power User With Microsoft Visual Studio Code
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
PDF
Kubernetes at Datadog Scale
PDF
Labels, Labels, Labels
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
PDF
Developing with Docker for the Arm Architecture
PDF
Sharing is Caring: How to Begin Speaking at Conferences
PDF
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
Containerize Your Game Server for the Best Multiplayer Experience
How to Improve Your Image Builds Using Advance Docker Build
Build & Deploy Multi-Container Applications to AWS
Securing Your Containerized Applications with NGINX
How To Build and Run Node Apps with Docker and Compose
Hands-on Helm
Distributed Deep Learning with Docker at Salesforce
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Monitoring in a Microservices World
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Predicting Space Weather with Docker
Become a Docker Power User With Microsoft Visual Studio Code
How to Use Mirroring and Caching to Optimize your Container Registry
Monolithic to Microservices + Docker = SDLC on Steroids!
Kubernetes at Datadog Scale
Labels, Labels, Labels
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Developing with Docker for the Arm Architecture
Sharing is Caring: How to Begin Speaking at Conferences
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Tartificialntelligence_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
August Patch Tuesday
Building Integrated photovoltaic BIPV_UPV.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Tartificialntelligence_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
A comparative study of natural language inference in Swahili using monolingua...
MIND Revenue Release Quarter 2 2025 Press Release
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Group 1 Presentation -Planning and Decision Making .pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
August Patch Tuesday

Docker for .NET Developers - Michele Leroux Bustamante, Solliance