Visual Studio 2017 brings Docker Home

Visual Studio 2017 Release Candidate is out for quite a while and the engineering teams must be working very closely with Docker folks to bring containers native experience to Windows 10. In this blog posts, I've outlined simple steps to experience Docker support in Visual Studio 2017,

  • Install Docker for Windows
  • Run Visual Studio 2017 RC setup and ensue you’ve checked .NET Core and Docker (Preview)

vs-installation-docker

  • Start Visual Studio and create a new ASP .NET Core Web Application

new-project

  • In the ASP .NET Core Template dialog, select Web Application (Notice the Enable Docker Support built into the experience).

web-application

  • Once the web application is setup, right click on the project and Add > Docker Project Support

add-docker-support

  • This will introduce the Dockerfile and docker-compose which lets one control versioning and output image name upon building the application. It also introduces an option to run the application right inside a Docker container both in Debug and Release mode and you can test that out.

docker-run

  • However, what I loved the most was the fact that Building the application in Release mode will instantly place an image you can interact with using Docker CLI as shown below,

docker-build

 

docker-ps running-website