SlideShare una empresa de Scribd logo
1 de 26
docker with
Visual Studio 2017
Tokyo .NET Developers Meetup #20 - 2017-3-21
@tanaka_733
Who is @tanaka_733?
Working for Red Hat K.K.
◦ Responsible for .NET Core on RHEL, Red Hat on Azure and OpenShift
◦ OpenShift: Container Platform as a Service. “Enterprise” kubernetes
◦ kubernetes: one of docker orchestration platform
Microsoft MVP for Visual Stduio and Development Technologies
◦ Recent Target: .NET Core on Linux, C# 7.0, Linux on Azure
SQL Server on Linux
◦ Blogs: Red Hat Developers
https://medium.com/@tanaka_733/
Takeaways
What is the docker?
Getting Started docker for Windows
Getting Started ASP.NET Core on docker with Visual Studio 2017
What’s docker?
Like a Virtual Machine
Linux OS
isolation tools
Faster to launch.
VM and docker
Host Hardware
Host Linux OS
Hypervisor
VM
Virtual HW
Guest OS
Process
Process
Process
VM
Virtual HW
Guest OS
Process
Process
Process
Host Hardware
Host Linux OS
Process
Docker Engine
Container
Process
Container
Process
docker and Windows
Docker for Windows
◦ Supporting Linux Docker
◦ Working with Hyper-V (required Windows 10 Pro/Enterprise/Education)
◦ Running docker host Linux OS as a Hyper-V guest VM
◦ If not satisfy, you can use docker toolbox (VirtualBox)
Windows Server Container & Hyper-V Container
◦ Container technology for Windows
◦ Windows Server Container: lightweight, run as a host OS process
◦ Hyper-V container: high isolation, run as a process in Hyper-V guest VM
Docker for Windows
https://docs.docker.com/docker-for-windows/install/
Getting Started docker for Windows
Launch powershell (or cmd), then you have been already able to run docker commands.
Run docker image
Connect into the container
Port mapping (run Web Server)
Kitematic
Visual Studio 2017 & docker
Visual Studio 2015
◦ supporting docker by Visual Studio extension
◦ docker tools for VS
◦ This extension will be open sourced.
Visual Studio 2017
◦ supporting docker without extension
Getting Started with Visual Studio 2017
docker-compose project
Dockerfile
Base ASP.NET Core project
docker-compose project
(supporting docker debug)
Dockerfile example
FROM microsoft/aspnetcore:1.1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "DockerExample.dll"]
Base Docker image
Pass the argument during build
Specify Working Directory
Expose the port to listen
Copy local binary into docker
Specify the command to run
You have to build your app before docker build.
$ dotnet publish -c Debug
What’s docker-compose?
Compose is a tool for defining and running multi-container Docker applications.
◦ https://docs.docker.com/compose/overview/
The generated compose file is a starting point.
◦ A single container for debugging and releasing.
◦ You can add more containers to require your app.
◦ e.g. Add database container, redis container etc…
docker compose example
services:
dockerexample:
image: dockerexample:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./DockerExample:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
image name
pass the ARG into Dockerfile
Environment Variables
Mount a volume.
Volume source is host OS (Windows)
Debug with docker
Debug with docker
tail -f /dev/null : run forever
/clrdbg/clrdbg : remote debugging
/usr/bin/dotnet : Application process
Remote debug mechanism (general)
22
GDB/LLDB
MICore
MIDE/Engine.Impl
MIDE/AD7.Impl
VSCode Debugger
AD7 Interface
MIDE: MIDebugEngine
MIText
VS Debugger
VS Debugger
Engine clrdbg
from MIEngine
WINDBG
Remote debug mechanism
23
clrdbg
AD7 Interface
VS Debugger
over SSH
Deploy to the Azure App Service on Linux
What’s App Service on Linux?
◦ Linux version of App Service
◦ App Service is so called “PaaS”
How to deploy?
◦ Deploy from Visual Studio directory.
◦ Use App Service source code integration.
◦ Commit code => App Service pulls code and builds it on its cluster.
◦ Creating docker image and deploy the image.
◦ Commit code => Build a docker image => push the image to private docker registry => app service pull the image
Deploy to the Azure App Service on Linux
docker build/deploy example
build process
SCM container registry
deploy process
docker host
Do you want to deploy to other?
Azure Container Services
◦ Easy to start your own orchestration cluster in Azure. Supporting kubernetes, DC/OS and Docker swarm
Google Container Engine
◦ kubernetes base
Amazon ECS
◦ container platform by Amazon. integrated with other Amazon services.
And many other orchestration tools…
OpenShift by Red Hat
◦ “Enterprise” kubernetes
◦ Adding features to kubernetes: project, build from source, routing and so on.

Más contenido relacionado

La actualidad más candente

До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019
UA Mobile
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
Akhmad Fathonih
 

La actualidad más candente (20)

ACM Gazi Docker?
ACM Gazi Docker?ACM Gazi Docker?
ACM Gazi Docker?
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Become a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeBecome a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio Code
 
Living with microservices at Pipedrive
Living with microservices at PipedriveLiving with microservices at Pipedrive
Living with microservices at Pipedrive
 
Azure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker imagesAzure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker images
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019
 
Labels, Labels, Labels
Labels, Labels, Labels Labels, Labels, Labels
Labels, Labels, Labels
 
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
Accelerating the Next 10,000 Clouds by Michael Kadera, IntelAccelerating the Next 10,000 Clouds by Michael Kadera, Intel
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
 
Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)Docker at Monoco.jp (LinkedIn)
Docker at Monoco.jp (LinkedIn)
 
How to Dockerize Angular, Vue and React Web Apps
How to Dockerize Angular, Vue and React Web AppsHow to Dockerize Angular, Vue and React Web Apps
How to Dockerize Angular, Vue and React Web Apps
 
Docker for Integration Testing
Docker for Integration TestingDocker for Integration Testing
Docker for Integration Testing
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Docker
 
My Journey to Becoming a Docker Captain
My Journey to Becoming a Docker CaptainMy Journey to Becoming a Docker Captain
My Journey to Becoming a Docker Captain
 
Docker containers on Windows
Docker containers on WindowsDocker containers on Windows
Docker containers on Windows
 
Demystifying Docker
Demystifying DockerDemystifying Docker
Demystifying Docker
 
Docker with WordPress
Docker with WordPressDocker with WordPress
Docker with WordPress
 
Docker - What it is and how to get started?
Docker - What it is and how to get started?Docker - What it is and how to get started?
Docker - What it is and how to get started?
 
Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
 

Similar a 20170321 docker with Visual Studio 2017

Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
Suresh Balla
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Puja Abbassi
 

Similar a 20170321 docker with Visual Studio 2017 (20)

DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Docker for a .NET web developer
Docker for a .NET web developerDocker for a .NET web developer
Docker for a .NET web developer
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 
Docking with Docker
Docking with DockerDocking with Docker
Docking with Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
 
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein MainIntroduction to Docker and Linux Containers @ Cloud Computing Rhein Main
Introduction to Docker and Linux Containers @ Cloud Computing Rhein Main
 
Run automated tests in Docker
Run automated tests in DockerRun automated tests in Docker
Run automated tests in Docker
 
Container on azure
Container on azureContainer on azure
Container on azure
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server Containers
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 

Más de Takayoshi Tanaka

.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
Takayoshi Tanaka
 

Más de Takayoshi Tanaka (20)

deep dive distributed tracing
deep dive distributed tracingdeep dive distributed tracing
deep dive distributed tracing
 
202202 open telemetry .net handson
202202 open telemetry .net handson202202 open telemetry .net handson
202202 open telemetry .net handson
 
202109-New_Relic-for-csharp-engineers
202109-New_Relic-for-csharp-engineers202109-New_Relic-for-csharp-engineers
202109-New_Relic-for-csharp-engineers
 
20210129 azure webapplogging
20210129 azure webapplogging20210129 azure webapplogging
20210129 azure webapplogging
 
20201127 .NET 5
20201127 .NET 520201127 .NET 5
20201127 .NET 5
 
Unity(再)入門
Unity(再)入門Unity(再)入門
Unity(再)入門
 
最近のQ#について
最近のQ#について最近のQ#について
最近のQ#について
 
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
SRENEXT 2020 [B5] New RelicのSREに学ぶSREのためのNew Relic活用法SRENEXT 2020 [B5] New RelicのSREに学ぶSREのためのNew Relic活用法
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
 
20191024 Get Start gRPC with ASP.NET
20191024 Get Start gRPC with ASP.NET20191024 Get Start gRPC with ASP.NET
20191024 Get Start gRPC with ASP.NET
 
New Relicで始める、.NET Applications on AWSのObservability
New Relicで始める、.NET Applications on AWSのObservabilityNew Relicで始める、.NET Applications on AWSのObservability
New Relicで始める、.NET Applications on AWSのObservability
 
C#エンジニアのためのdocker kubernetesハンズオン (再)
C#エンジニアのためのdocker kubernetesハンズオン (再)C#エンジニアのためのdocker kubernetesハンズオン (再)
C#エンジニアのためのdocker kubernetesハンズオン (再)
 
20190806 Q# Measurements
20190806 Q# Measurements20190806 Q# Measurements
20190806 Q# Measurements
 
C#エンジニアのためのdocker kubernetesハンズオン
C#エンジニアのためのdocker kubernetesハンズオンC#エンジニアのためのdocker kubernetesハンズオン
C#エンジニアのためのdocker kubernetesハンズオン
 
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
20190604 Containerized MagicOnion on kubernetes with Observability with New R...20190604 Containerized MagicOnion on kubernetes with Observability with New R...
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
 
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
 
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
 
Try! Visual Studio 209 git feature
Try! Visual Studio 209 git featureTry! Visual Studio 209 git feature
Try! Visual Studio 209 git feature
 
Q#基礎 ver1.1
Q#基礎 ver1.1Q#基礎 ver1.1
Q#基礎 ver1.1
 
(過去バージョン) Q#基礎 ver1.0
(過去バージョン) Q#基礎 ver1.0(過去バージョン) Q#基礎 ver1.0
(過去バージョン) Q#基礎 ver1.0
 
ゼロから始めるQ#
ゼロから始めるQ#ゼロから始めるQ#
ゼロから始めるQ#
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

20170321 docker with Visual Studio 2017

  • 1. docker with Visual Studio 2017 Tokyo .NET Developers Meetup #20 - 2017-3-21 @tanaka_733
  • 2. Who is @tanaka_733? Working for Red Hat K.K. ◦ Responsible for .NET Core on RHEL, Red Hat on Azure and OpenShift ◦ OpenShift: Container Platform as a Service. “Enterprise” kubernetes ◦ kubernetes: one of docker orchestration platform Microsoft MVP for Visual Stduio and Development Technologies ◦ Recent Target: .NET Core on Linux, C# 7.0, Linux on Azure SQL Server on Linux ◦ Blogs: Red Hat Developers https://medium.com/@tanaka_733/
  • 3. Takeaways What is the docker? Getting Started docker for Windows Getting Started ASP.NET Core on docker with Visual Studio 2017
  • 4. What’s docker? Like a Virtual Machine Linux OS isolation tools Faster to launch.
  • 5. VM and docker Host Hardware Host Linux OS Hypervisor VM Virtual HW Guest OS Process Process Process VM Virtual HW Guest OS Process Process Process Host Hardware Host Linux OS Process Docker Engine Container Process Container Process
  • 6. docker and Windows Docker for Windows ◦ Supporting Linux Docker ◦ Working with Hyper-V (required Windows 10 Pro/Enterprise/Education) ◦ Running docker host Linux OS as a Hyper-V guest VM ◦ If not satisfy, you can use docker toolbox (VirtualBox) Windows Server Container & Hyper-V Container ◦ Container technology for Windows ◦ Windows Server Container: lightweight, run as a host OS process ◦ Hyper-V container: high isolation, run as a process in Hyper-V guest VM
  • 8. Getting Started docker for Windows Launch powershell (or cmd), then you have been already able to run docker commands.
  • 10. Connect into the container
  • 11. Port mapping (run Web Server)
  • 13. Visual Studio 2017 & docker Visual Studio 2015 ◦ supporting docker by Visual Studio extension ◦ docker tools for VS ◦ This extension will be open sourced. Visual Studio 2017 ◦ supporting docker without extension
  • 14. Getting Started with Visual Studio 2017
  • 15. docker-compose project Dockerfile Base ASP.NET Core project docker-compose project (supporting docker debug)
  • 16. Dockerfile example FROM microsoft/aspnetcore:1.1.1 ARG source WORKDIR /app EXPOSE 80 COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "DockerExample.dll"] Base Docker image Pass the argument during build Specify Working Directory Expose the port to listen Copy local binary into docker Specify the command to run You have to build your app before docker build. $ dotnet publish -c Debug
  • 17. What’s docker-compose? Compose is a tool for defining and running multi-container Docker applications. ◦ https://docs.docker.com/compose/overview/ The generated compose file is a starting point. ◦ A single container for debugging and releasing. ◦ You can add more containers to require your app. ◦ e.g. Add database container, redis container etc…
  • 18. docker compose example services: dockerexample: image: dockerexample:dev build: args: source: ${DOCKER_BUILD_SOURCE} environment: - DOTNET_USE_POLLING_FILE_WATCHER=1 volumes: - ./DockerExample:/app - ~/.nuget/packages:/root/.nuget/packages:ro - ~/clrdbg:/clrdbg:ro entrypoint: tail -f /dev/null labels: - "com.microsoft.visualstudio.targetoperatingsystem=linux" image name pass the ARG into Dockerfile Environment Variables Mount a volume. Volume source is host OS (Windows)
  • 20. Debug with docker tail -f /dev/null : run forever /clrdbg/clrdbg : remote debugging /usr/bin/dotnet : Application process
  • 21. Remote debug mechanism (general) 22 GDB/LLDB MICore MIDE/Engine.Impl MIDE/AD7.Impl VSCode Debugger AD7 Interface MIDE: MIDebugEngine MIText VS Debugger VS Debugger Engine clrdbg from MIEngine WINDBG
  • 22. Remote debug mechanism 23 clrdbg AD7 Interface VS Debugger over SSH
  • 23. Deploy to the Azure App Service on Linux What’s App Service on Linux? ◦ Linux version of App Service ◦ App Service is so called “PaaS” How to deploy? ◦ Deploy from Visual Studio directory. ◦ Use App Service source code integration. ◦ Commit code => App Service pulls code and builds it on its cluster. ◦ Creating docker image and deploy the image. ◦ Commit code => Build a docker image => push the image to private docker registry => app service pull the image
  • 24. Deploy to the Azure App Service on Linux
  • 25. docker build/deploy example build process SCM container registry deploy process docker host
  • 26. Do you want to deploy to other? Azure Container Services ◦ Easy to start your own orchestration cluster in Azure. Supporting kubernetes, DC/OS and Docker swarm Google Container Engine ◦ kubernetes base Amazon ECS ◦ container platform by Amazon. integrated with other Amazon services. And many other orchestration tools… OpenShift by Red Hat ◦ “Enterprise” kubernetes ◦ Adding features to kubernetes: project, build from source, routing and so on.

Notas del editor

  1. https://github.com/Microsoft/MIEngine
  2. https://github.com/Microsoft/MIEngine