You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/docker/visual-studio-tools-for-docker.md
+17-15
Original file line number
Diff line number
Diff line change
@@ -1,36 +1,35 @@
1
1
---
2
2
title: Visual Studio Tools for Docker
3
3
description: Using Visual Studio Tools for Docker
4
-
keywords: .NET, .NET Core, Docker, ASP.NET Core, Visual Studio 2015
4
+
keywords: .NET, .NET Core, Docker, ASP.NET Core, Visual Studio
5
5
author: spboyer
6
6
ms.author: shboyer
7
-
ms.date: 09/16/2016
7
+
ms.date: 04/27/2017
8
8
ms.topic: article
9
9
ms.prod: .net-core
10
10
ms.technology: dotnet-docker
11
11
ms.devlang: dotnet
12
12
ms.assetid: 1f3b9a68-4dea-4b60-8cb3-f46164eedbbf
13
13
---
14
14
15
-
# Visual Studio Tools for Docker
16
-
Developing and debugging your application in a Docker container can be a ceremony of tasks to get setup with various tools. [Visual Studio Tools for Docker](https://visualstudiogallery.msdn.microsoft.com/0f5b2caa-ea00-41c8-b8a2-058c7da0b3e4) helps you get past the hurdles and find the bugs using F5 to debug your application directly in a locally hosted Docker Container.
15
+
# Visual Studio Tools for Docker
17
16
18
-
> [!NOTE]
19
-
>The current version targets Linux Docker containers, with Windows Containers coming soon.
17
+
[Microsoft Visual Studio 2017](https://www.visualstudio.com/) with [Docker for Windows](https://docs.docker.com/docker-for-windows/install/) supports building, debugging, and running .NET Framework and .NET Core web and console applications using Windows and Linux containers.
20
18
21
19
## Prerequisites
22
-
-[Microsoft Visual Studio 2015 Update 3](https://www.visualstudio.com/downloads/download-visual-studio-vs)
23
-
-[.NET Core 1.0.1 - VS 2015 Tooling Preview 2](https://go.microsoft.com/fwlink/?LinkID=827546)
24
-
-[Docker For Windows](https://www.docker.com/products/docker#/windows) to run your Docker containers locally
20
+
21
+
-[Microsoft Visual Studio 2017](https://www.visualstudio.com/)
22
+
-[Docker for Windows](https://docs.docker.com/docker-for-windows/install/)
25
23
26
24
## Installation and setup
27
-
Download and install the [Visual Studio Tools for Docker](https://aka.ms/DockerToolsForVS) from the [Visual Studio Gallery](http://visualstudiogallery.msdn.microsoft.com/) or you can search for it in **Extensions and Updates** within Visual Studio.
28
25
29
-
A required configuration is to setup **[Shared Drives](https://docs.docker.com/docker-for-windows/#/shared-drives)** in Docker for Windows. The setting is required for the volume mapping and debugging support.
26
+
Install [Microsoft Visual Studio 2017](https://www.visualstudio.com/) with the .NET Core workload. Review the information at [Docker for Windows: What to know before you install](https://docs.docker.com/docker-for-windows/install/#what-to-know-before-you-install) and install [Docker For Windows](https://docs.docker.com/docker-for-windows/install/).
27
+
28
+
A required configuration is to setup **[Shared Drives](https://docs.docker.com/docker-for-windows/#shared-drives)** in Docker for Windows. The setting is required for the volume mapping and debugging support.
30
29
31
30
Right click the Docker icon in the System Tray, click Settings and select Shared Drives.
## Create an ASP.NET Web Application and add Docker Support
36
35
@@ -46,8 +45,8 @@ Project Context Menu
46
45
47
46
The following files are added to the project.
48
47
49
-
-**Dockerfile**: the Docker file for ASP.NET Core applications is based on the [microsoft/aspnetcore](https://hub.docker.com/r/microsoft/aspnetcore) image. This image includes the ASP.NET Core NuGet packages, which have been pre-jitted improving startup performance. When building .NET Core Console Applications, the Dockerfile FROM will reference the most recent [microsoft/dotnet](https://hub.docker.com/r/microsoft/dotnet) image.
50
-
-**docker-compose.yml**: base Docker Compose file used to define the collection of images to be built and run with docker-compose build/run.
48
+
-**Dockerfile**: the Docker file for ASP.NET Core applications is based on the [microsoft/aspnetcore](https://hub.docker.com/r/microsoft/aspnetcore) image. This image includes the ASP.NET Core NuGet packages, which have been pre-jitted improving startup performance. When building .NET Core Console Applications, the Dockerfile FROM will reference the most recent [microsoft/dotnet](https://hub.docker.com/r/microsoft/dotnet) image.
49
+
-**docker-compose.yml**: base Docker Compose file used to define the collection of images to be built and run with docker-compose build/run.
51
50
-**docker-compose.dev.debug.yml**: additional docker-compose file with for iterative changes when your configuration is set to debug. Visual Studio will call -f docker-compose.yml -f docker-compose.dev.debug.yml to merge these together. This compose file is used by Visual Studio development tools.
52
51
-**docker-compose.dev.release.yml**: additional Docker Compose file to debug your release definition. It will volume mount the debugger so it doesn't change the contents of the production image.
53
52
@@ -72,6 +71,7 @@ In this example, `image: user/hellodockertools${TAG}` generates the image `user/
72
71
You will want to change the `user` to your Docker Hub username if you plan to push the image to the registry. For example, `spboyer/hellodockertools`, or change to your private registry url `privateregistry.domain.com/` depending on your configuration.
73
72
74
73
### Debugging
74
+
75
75
Select **Docker** from the debug dropdown in the toolbar and use F5 to start debugging the application.
76
76
77
77
- The microsoft/aspnetcore image is acquired (if not already in your cache)
@@ -97,6 +97,7 @@ CONTAINER ID IMAGE COMMAND CREATED
97
97
```
98
98
99
99
### Edit and Continue
100
+
100
101
Changes to static files and/or razor template files (.cshtml) are automatically updated without the need of a compilation step. Make the change, save and tap refresh in the browser to view the update.
101
102
102
103
Modifications to code files require compiling and a restart of Kestrel within the container. After making the change, use CTRL + F5 to perform the process and start the application within the container. The Docker container is not rebuilt or stopped; using `docker ps` in the command line you can see that the original container is still running as of 10 minutes ago.
@@ -106,7 +107,8 @@ CONTAINER ID IMAGE COMMAND CREATED
106
107
3f240cf686c9 spboyer/hellodockertools:dev "tail -f /dev/null" 10 minutes ago Up 10 minutes 0.0.0.0:32769->80/tcp hellodockertools_hellodockertools_1
107
108
```
108
109
109
-
### Publishing Docker images
110
+
### Publishing Docker images
111
+
110
112
Once you have completed the develop and debug cycle of your application, the Visual Studio Tools for Docker will help you create the production image of your application. Change the debug dropdown to **Release** and build the application. The tooling will produce the image with the `:latest` tag which you can push to your private registry or Docker Hub.
111
113
112
114
Using the `docker images` you can see the list of images.
Copy file name to clipboardExpand all lines: docs/core/getting-started.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ Install .NET Core on [Windows](https://www.microsoft.com/net/core#windows).
22
22
You can get started developing .NET Core apps by following these step-by-step tutorials.
23
23
24
24
*[Building a C# Hello World Application with .NET Core in Visual Studio 2017](../csharp/getting-started/with-visual-studio.md) - Learn to to build, debug, and publish a simple .NET Core console application using Visual Studio 2017.
25
-
*[Building a class library with C# and .NET Core in Visual Studio 2017](../csharp/getting-started/library-with-visual-studio-2017.md) - Learn how to build a class library written in C# using Visual Studio 2017
26
-
*[Get started with Visual Studio Code using C# and .NET Core on Windows](https://channel9.msdn.com/Blogs/dotnet/Get-started-VSCode-Csharp-NET-Core-Windows) - This [Channel9](https://channel9.msdn.com) video shows you how to install and use [Visual Studio Code](https://code.visualstudio.com/), Microsoft's lightweight cross-platform code editor, to create your first console application in .NET Core.
25
+
*[Building a class library with C# and .NET Core in Visual Studio 2017](../csharp/getting-started/library-with-visual-studio.md) - Learn how to build a class library written in C# using Visual Studio 2017.
26
+
*[Get started with Visual Studio Code using C# and .NET Core on Windows](https://channel9.msdn.com/Blogs/dotnet/Get-started-with-VS-Code-using-CSharp-and-NET-Core) - This [Channel9](https://channel9.msdn.com) video shows you how to install and use [Visual Studio Code](https://www.visualstudio.com/products/code-vs), Microsoft's lightweight cross-platform code editor, to create your first console application in .NET Core.
27
27
*[Get Started with .NET Core and Visual Studio 2017](https://channel9.msdn.com/Blogs/dotnet/Get-Started-NET-Core-Visual-Studio-2017) - This [Channel9](https://channel9.msdn.com) video shows you how to install and use [Visual Studio 2017](https://www.visualstudio.com/), Microsoft's fully-featured IDE, to create your first cross-platform console application in .NET Core.
28
28
*[Getting started with .NET Core using the command-line](tutorials/using-with-xplat-cli.md) - Use any code editor with the [.NET Core cross-platform command-line interface (CLI)](tools/index.md).
0 commit comments