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
* Toc and seo changes
* seo work
* Add CTW to overview
* link to Containers window
* start stubbing out sections
* CTW work
* fix image link
* Continued improvements in CTW and linkage
* Fix link
* add Dockerfile and link to CTW in Container Build
* fix link
* change link wording
* remove Kubernetes support
* incorporate feedback
* more feedback changes
* Fix warning and suggestion
* add gray border
* add image and fix table
* small fixes
* fix typo
* Add missing table entry
* add link
Copy file name to clipboardExpand all lines: docs/containers/container-build.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,9 @@ Warmup will only happen in **Fast** mode, so the running container will have the
97
97
98
98
## Volume mapping
99
99
100
-
For debugging to work in containers, Visual Studio uses volume mapping to map the debugger and NuGet folders from the host machine. Volume mapping is described in the Docker documentation [here](https://docs.docker.com/storage/volumes/). Here are the volumes that are mounted in your container:
100
+
For debugging to work in containers, Visual Studio uses volume mapping to map the debugger and NuGet folders from the host machine. Volume mapping is described in the Docker documentation [here](https://docs.docker.com/storage/volumes/). You can view the volume mappings for a container by using the [Containers window in Visual Studio](view-and-diagnose-containers.md).
101
+
102
+
Here are the volumes that are mounted in your container:
| Pull required Docker images on project open | True | Single Project, Docker Compose | For increased performance when loading projects, Visual Studio will start a Docker pull operation in the background so that when you're ready to run your code, the image is already downloaded or in the process of downloading. If you're just loading projects and browsing code, you can set to **False** to avoid downloading container images you don't need. |
59
+
| Pull updated Docker images on project open | .NET Core projects | Single Project, Docker Compose | When you open a project, check for updates to images and download if available. |
59
60
| Run containers on project open | True | Single Project, Docker Compose | Again for increased performance, Visual Studio creates a container ahead of time so that it's ready for when you build and run your container. If you want to control when your container is created, set to **False**. |
60
-
| Stop containers on project close | True | Single Project and Docker Compose | Set to **False** if you would like containers for your solution to continue to run after closing the solution or closing Visual Studio. |
61
+
| Remove containers on project close | True | Single Project, Docker Compose | Set to **False** if you would like containers for your solution to be retained after closing the solution or closing Visual Studio. |
62
+
63
+
The **Containers Tool Window** settings control the settings that apply to the **Containers** tool window, which shows information about Docker containers and images. See [Use the Containers window](view-and-diagnose-containers.md)
64
+
65
+

66
+
67
+
The following table describes the **Containers** window settings:
68
+
69
+
70
+
| Name | Default Setting | Description |
71
+
| -----|:---------------:| ----------- |
72
+
| Confirm before pruning containers | Always | Controls whether you are prompted when pruning unused containers. |
73
+
| Confirm before pruning images | Always | Controls whether you are prompted when pruning unused images. |
74
+
| Confirm before removing a container | Always | Controls whether you are prompted when removing a container. |
75
+
| Confirm before removing an image | Always | Controls whether you are prompted when removing an image. |
76
+
| Confirm before running large number of images | Always | Controls whether you are prompted before starting containers from more than 10 images at a time. |
Copy file name to clipboardExpand all lines: docs/containers/launch-profiles.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.date: 05/10/2021
10
10
ms.author: ghogen
11
11
monikerRange: ">=vs-2019"
12
12
---
13
-
# Manage launch profiles for Docker Compose
13
+
# Launch a subset of Compose services
14
14
15
15
If you have an application that consists of multiple services and uses Docker Compose, you can configure which services run and debug by creating or editing an existing launch profile in Docker Compose launch settings. Launch profiles allow you to dynamically run only the services that matter to your current scenario. You can create and select from launch profiles in order to customize your debugging experience and set specific launch actions such as `Browser Launch URL`. You will also have the option of either choosing each service individually or by choosing a Docker Compose profile, which also looks at your Compose file to determine the group of services to run.
16
16
@@ -19,7 +19,7 @@ For information about Docker Compose profiles, see [Using profiles with Compose]
19
19
## Prerequisites
20
20
21
21
-[Visual Studio 2019 version 16.10](https://visualstudio.microsoft.com/vs/) or later
22
-
- A solution with [Container Orchestration with Docker Compose](tutorial-multicontainer.md)
22
+
- A .NET solution with [Container Orchestration with Docker Compose](tutorial-multicontainer.md)
Copy file name to clipboardExpand all lines: docs/containers/overview.md
+46-19Lines changed: 46 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
-
title: Visual Studio Container Tools on Windows
2
+
title: Visual Studio Container Tools for Docker on Windows
3
3
description: Get to know the tools available in Visual Studio for working with Docker
4
4
author: ghogen
5
5
ms.author: ghogen
6
6
ms.topic: overview
7
-
ms.date: 03/20/2019
7
+
ms.date: 08/24/2021
8
8
ms.technology: vs-container-tools
9
9
---
10
-
# Container Tools in Visual Studio
10
+
# Visual Studio Container Tools for Docker
11
11
12
-
The tools included in Visual Studio for developing with containers are easy to use, and greatly simplify building, debugging, and deployment for containerized applications. You can work with a container for a single project, or use container orchestration with Docker Compose, Service Fabric, or Kubernetes to work with multiple services in containers.
12
+
The tools included in Visual Studio for developing with Docker containers are easy to use, and greatly simplify building, debugging, and deployment for containerized applications. You can work with a container for a single project, or use container orchestration with Docker Compose or Service Fabric to work with multiple services in containers.
13
13
14
14
::: moniker range="vs-2017"
15
15
@@ -21,14 +21,14 @@ The tools included in Visual Studio for developing with containers are easy to u
21
21
22
22
## Docker support in Visual Studio
23
23
24
-
Docker support is available for ASP.NET projects, ASP.NET Core projects, and .NET Core and .NET Framework console projects.
24
+
Docker support is available for ASP.NET projects, ASP.NET Core projects, Azure Functions, and .NET Core and .NET Framework console projects.
25
25
26
26
The support for Docker in Visual Studio has changed over a number of releases in response to customer needs. There are two levels of Docker support you can add to a project, and the supported options vary by the type of project and the version of Visual Studio. With some supported project types, if you just want a container for a single project, without using orchestration, you can do that by adding Docker support. The next level is container orchestration support, which adds appropriate support files for the particular orchestrator you choose.
27
27
28
-
With Visual Studio 2017, you can use Docker Compose and Service Fabric as container orchestration services. You can also use Kubernetes if you install the [Visual Studio Tools for Kubernetes](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vs-tools-for-kubernetes).
28
+
With Visual Studio 2017, you can use Docker Compose and Service Fabric as container orchestration services.
29
29
30
30
> [!NOTE]
31
-
> If you are using a version of Visual Studio 2017 prior to 15.8, or you are using the .NET Framework project template (not .NET Core), when you add Docker support, orchestration support using Docker Compose is added automatically. Container orchestration support, via Docker Compose, is added automatically in Visual Studio 2017 versions 15.0 to 15.7 and for .NET Framework projects.
31
+
> If you are using a version of Visual Studio 2017 prior to 15.8, or you are using the .NET Framework project template (not .NET Core), when you add Docker support, orchestration support using Docker Compose is added automatically.
32
32
33
33
::: moniker-end
34
34
@@ -52,7 +52,7 @@ With Visual Studio 2019, you can use Docker Compose, Kubernetes, and Service Fab
52
52
> [!NOTE]
53
53
> If you are using the full .NET Framework console project template, the supported option is **Add Container Orchestrator support** after project creation, with options to use Service Fabric or Docker Compose. Adding support at project creation and **Add Docker support** for a single project without orchestration are not available options.
54
54
55
-
In Visual Studio 2019 version 16.4 and later, the **Containers** window is available, which lets you view running containers, browse available images, view environment variables, logs, and port mappings, inspect the filesystem, attach a debugger, or open a terminal window inside the container environment. See [View and diagnose containers and images in Visual Studio](view-and-diagnose-containers.md).
55
+
In Visual Studio 2019 version 16.4 and later, the **Containers** window is available, which lets you view running containers, browse available images, view environment variables, logs, and port mappings, inspect the filesystem, attach a debugger, or open a terminal window inside the container environment. See [Use the Containers window](view-and-diagnose-containers.md).
56
56
57
57
::: moniker-end
58
58
@@ -80,11 +80,32 @@ When you add or enable Docker support, Visual Studio adds the following to the p
80
80
- a .dockerignore file
81
81
- a NuGet package reference to the Microsoft.VisualStudio.Azure.Containers.Tools.Targets
82
82
83
-
::: moniker range=">=vs-2019"
84
-
The solution looks like this once you add Docker support:
83
+
The Dockerfile you add will resemble the following code. In this example, the project was named `WebApplication-Docker`.
85
84
86
-

87
-
::: moniker-end
85
+
```Dockerfile
86
+
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
@@ -93,6 +114,18 @@ The solution looks like this once you add Docker support:
93
114

94
115
::: moniker-end
95
116
117
+
## Use the Containers window
118
+
119
+
The **Containers** window lets you view containers and images on your machine and see what's going on with them. You can view the filesystem, volumes mounted, environment variables, ports used, and examine log files.
120
+
121
+
Open the **Containers** window by using the quick launch (**Ctrl**+**Q**) and typing `containers`. You can use the docking controls to put the window somewhere. Because of the width of the window, it works best when docked at the bottom of the screen.
122
+
123
+
Select a container, and use the tabs to view the information that's available. To check it out, run your Docker-enabled app, open the **Files** tab, and expand the **app** folder to see your deployed app on the container.
124
+
125
+

126
+
127
+
For more information, see [Use the Containers window](view-and-diagnose-containers.md).
128
+
96
129
## Docker Compose support
97
130
98
131
When you want to compose a multi-container solution using Docker Compose, add container orchestration support to your projects. This lets you run and debug a group of containers (a whole solution or group of projects) at the same time if they're defined in the same *docker-compose.yml* file.
@@ -107,13 +140,7 @@ If *docker-compose.yml* already exists, Visual Studio just adds the required lin
107
140
108
141
Repeat the process with the other projects that you want to control using Docker Compose.
109
142
110
-
## Kubernetes support
111
-
112
-
::: moniker range="vs-2017"
113
-
To add Kubernetes support, install the [Visual Studio Tools for Kubernetes](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vs-tools-for-kubernetes).
114
-
::: moniker-end
115
-
116
-
With Kubernetes support, you can enable a connection between your local project and a Kubernetes cluster running in [Azure Kubernetes Service (AKS)](/azure/aks), and thereby modify and debug your services running using Visual Studio. This service is provided by [Bridge to Kubernetes](/visualstudio/bridge/overview-bridge-to-kubernetes).
143
+
If you work with a large number of services, you can save time and computing resources by selecting which subset of services you want to start in your debugging session. See [Start a subset of Compose services](launch-profiles.md).
Copy file name to clipboardExpand all lines: docs/containers/tutorial-multicontainer.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,7 @@ Add a project to the same solution and call it *MyWebAPI*. Select **API** as the
197
197
198
198
Look at the options for deploying your [containers to Azure](/azure/containers).
199
199
200
-
For greater control over which services are started during a debug session, learn how to use Docker Compose launch profiles to configure which services run when debugging. See [Manage launch profiles for Docker Compose](launch-profiles.md)
200
+
If you work with a large number of microservices, many of which aren't needed for a every debugging task, you can use Docker Compose launch profiles for greater control over which services are started during a debug session. See [Manage launch profiles for Docker Compose](launch-profiles.md).
0 commit comments