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/remote/containers.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ DateApproved: 5/2/2019
9
9
---
10
10
# Developing inside a Container
11
11
12
-
The **Visual Studio Code Remote - Containers** extension lets you use a [Docker container](https://docker.com) as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of VS Code's full feature set. A [`devcontainer.json` file](#devcontainerjson) in your project tells VS Code how to access (or create) a **development container** with a welldefined tool and runtime stack. This container may be used to actually run an application or be focused exclusively on sandboxing tools, libraries, runtimes, or other utilities that need to be run against a codebase.
12
+
The **Visual Studio Code Remote - Containers** extension lets you use a [Docker container](https://docker.com) as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of VS Code's full feature set. A [`devcontainer.json` file](#devcontainerjson) in your project tells VS Code how to access (or create) a **development container** with a well-defined tool and runtime stack. This container may be used to actually run an application or be focused exclusively on sandboxing tools, libraries, runtimes, or other utilities that need to be run against a codebase.
13
13
14
14
Workspace files are mounted from the local file system or copied or cloned into the container. Extensions are installed and run inside the container where they have full access to the tools, platform, and file system. This means that you can seamlessly switch your entire development environment by just connecting to a different container.
15
15
@@ -80,7 +80,9 @@ Let's start out by using a sample project to try things out.
80
80
81
81
### Quick start: Open a folder in a container
82
82
83
-
Next we will cover how to set up a dev container for an existing project so that you can to use the container as your full-time development environment. The steps are very similar to those above:
83
+
Next we will cover how to set up a dev container for an existing project so that you can use the container as your full-time development environment.
84
+
85
+
The steps are similar to those above:
84
86
85
87
1. Start VS Code, run the **Remote-Containers: Open Folder in Container...**command from the Command Palette, and selectthe project folder you'd like to set up the container for.
86
88
@@ -158,7 +160,7 @@ Run **Remote-Containers: Attach to Running Container...** command from the Comma
158
160
159
161
2. Go to the Docker view and expand the **Containers** node in the explorer.
160
162
161
-
3. Rightclick and select**Attach Visual Studio Code**.
163
+
3. Right-click and select**Attach Visual Studio Code**.
162
164
163
165

164
166
@@ -226,7 +228,9 @@ If there are extensions that you would like always installed in any container, y
226
228
227
229
### Advanced: Forcing an extension to run locally / remotely
228
230
229
-
VS Code runs extensions in one of two places: locally on the **UI** / client side, or remotely on the **Workspace** / container side. Extensions typically are designed and tested forusein one side or the other, not both. However, you can force an extension to run in a particular location in your User [settings](/docs/getstarted/settings.md). For example, the `remote.extensionKind` setting below will force the Azure Cosmos DB extension on the UI side (instead of its Workspace default) and the Debugger for Chrome on the Workspace side (instead of its UI default):
231
+
VS Code runs extensions in one of two places: locally on the **UI** / client side, or remotely on the **Workspace** / container side. Extensions typically are designed and tested forusein one side or the other, not both. However, you can force an extension to run in a particular location in your User [settings](/docs/getstarted/settings.md).
232
+
233
+
For example, the `remote.extensionKind` setting below will force the Azure Cosmos DB extension on the UI side (instead of its Workspace default) and the Debugger for Chrome on the Workspace side (instead of its UI default):
230
234
231
235
```json
232
236
"remote.extensionKind": {
@@ -271,7 +275,7 @@ In each case, you'll need to rebuild your container for the setting to take effe
271
275
272
276
Opening a terminal in a container from VS Code is simple. Once you've opened a folder in a container, **any terminal window** you open in VS Code (**Terminal > New Terminal**) will automatically run in the container rather than locally.
273
277
274
-
You can also **use the `code-insiders`CLI**from this same terminal window to perform a number of operations such as opening a new file or folder in the container. Type `code-insiders --help` to learn what is available from the command line.
278
+
You can also use the `code-insiders`command line from this same terminal window to perform a number of operations such as opening a new file or folder in the container. Type `code-insiders --help` to learn what options are available from the command line.
275
279
276
280

277
281
@@ -283,7 +287,7 @@ See the [debugging](/docs/editor/debugging.md) documentation for details on conf
283
287
284
288
## Container specific settings
285
289
286
-
VS Code's local user settings are also reused when you are connected to a dev container. While this keeps your user experience consistent, you may want to vary some of these settings between your local machine and each container. Fortunately, once you have connected to a container, you can also set containerspecific settings by running the **Preferences: Open Remote Settings** command from the Command Palette (`kbstyle(F1)`) or by clicking on the "Remote" tab in the settings editor. These will override any local settings you have in place whenever you connect to the container.
290
+
VS Code's local user settings are also reused when you are connected to a dev container. While this keeps your user experience consistent, you may want to vary some of these settings between your local machine and each container. Fortunately, once you have connected to a container, you can also set container-specific settings by running the **Preferences: Open Remote Settings** command from the Command Palette (`kbstyle(F1)`) or by selecting the **Remote** tab in the settings editor. These will override any local settings you have in place whenever you connect to the container.
287
291
288
292
### Default container specific settings
289
293
@@ -308,7 +312,7 @@ There are a few different ways VS Code Remote - Containers can be used to develo
308
312
309
313
* [Stand-Alone Dev Sandboxes](#working-with-a-developer-sandbox): Even if you are not deploying your application into a containerized environment, you may still want to isolate your build and runtime environment from your local OS or to edit, run, and debug code in an environment that is more representative of production. A single, stand-alone "dev sandbox" container can be used to achieve these goals even if you are not familiar with containers and/or do not deploy into a container in production. For example, today you may be running some code on your local macOS or Windows machine that is ultimately deployed to a Linux VM or server in production.
310
314
311
-
* **Container Deployed Applications**: In this case, you plan to deploy the application into one or more containers but would like to take advantage of the same benefits that stand-alone dev sandboxes provide. VS Code currently supports working with containerbased applications defined in a number of ways:
315
+
* **Container Deployed Applications**: In this case, you plan to deploy the application into one or more containers but would like to take advantage of the same benefits that stand-alone dev sandboxes provide. VS Code currently supports working with container-based applications defined in a number of ways:
312
316
313
317
* [Dockerfile](#using-a-dockerfile): You are working on a single container / service that is described using a single `Dockerfile`.
314
318
@@ -357,7 +361,7 @@ To open the folder in the container, run the **Remote-Containers: Open Folder in
357
361
358
362
### Installing additional software in the sandbox
359
363
360
-
Once VS Code is connected to the container, you can open a VS Code terminal and execute any command against the OS inside the container. This allows you to install new commandline utilities and spin up databases or application services from inside the Linux container.
364
+
Once VS Code is connected to the container, you can open a VS Code terminal and execute any command against the OS inside the container. This allows you to install new command-line utilities and spin up databases or application services from inside the Linux container.
361
365
362
366
Most container images are based on Debian or Ubuntu, where the `apt-get`command is used to install new packages.
Copy file name to clipboardExpand all lines: docs/remote/faq.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,11 +97,11 @@ Using the Docker extension from a VS Code window opened in a container has some
97
97
98
98
### As an extension author, what do I need to do?
99
99
100
-
The VS Code extension API abstracts many extensions away from any changes so they work without modification. However, given extensions can use any node module or runtime they want, there are situations where adjustments may need to be made. We recommend you should test your extension (particularly in a container) to be sure that no updates are required. See the article on[Supporting Remote Development](/api/advanced-topics/remote-extensions.md) for details.
100
+
The VS Code extension API abstracts away local/remote details so most extensions will work without modification. However, given extensions can use any node module or runtime they want, there are situations where adjustments may need to be made. We recommend you should test your extension (particularly in a container) to be sure that no updates are required. See [Supporting Remote Development](/api/advanced-topics/remote-extensions.md) for details.
101
101
102
102
### Can I give an extension access to local resources or APIs when a user is connected remotely?
103
103
104
-
When VS Code connects to a remote environment, extensions are classified as either "UI" or "Workspace" extensions. UI Extensions run in a "local extension host", can contribute UI or personalization features (e.g. themes), and have access to local files or APIs. Workspace extensions run in a "remote extension host" with the workspace and have full access to the code, remote filesystem, and remote APIs. While they do not focus on personalization, they can contribute explorers, viewlets, and other UI elements as well.
104
+
When VS Code connects to a remote environment, extensions are classified as either **UI** or **Workspace** extensions. UI Extensions run in a "local extension host", can contribute UI or personalization features (for example themes), and have access to local files or APIs. Workspace extensions run in a **remote extension host** with the workspace and have full access to the code, remote filesystem, and remote APIs. While they do not focus on personalization, they can contribute explorers, views, and other UI elements as well.
105
105
106
106
When a user installs an extension, VS Code attempts to infer the correct location and install it based on its type. Extensions that do not need to run remotely like themes and other personalization are automatically installed on the UI side. All others are treated as Workspace extensions since they are the most full-featured. However, extension authors can also override this location with an `extensionKind` property in `package.json`.
107
107
@@ -112,21 +112,22 @@ See [Supporting Remote Development](/api/advanced-topics/remote-extensions.md)fo
112
112
### Location
113
113
114
114
You can find the licenses for the VS Code Remote Extensions here:
### Why aren't the Remote Extensions using the MIT License?
120
121
121
-
The VS Code Remote Extensions are available under Microsoft pre-release licenses, similar to other servicebased extensions such as [Visual Studio IntelliCode](https://marketplace.visualstudio.com/items/VisualStudioExptTeam.vscodeintellicode/license) and [Visual Studio Live Share](https://marketplace.visualstudio.com/items/MS-vsliveshare.vsliveshare-pack/license). A Microsoft license (instead of MIT, for example) makes it easier for us to license certain features of the product, such as access to the Visual Studio Marketplace (section 1.d), the re-licensing of thirdparty components (section 1.c), and telemetry data (section 4).
122
+
The VS Code Remote Extensions are available under Microsoft pre-release licenses, similar to other service-based extensions such as [Visual Studio IntelliCode](https://marketplace.visualstudio.com/items/VisualStudioExptTeam.vscodeintellicode/license) and [Visual Studio Live Share](https://marketplace.visualstudio.com/items/MS-vsliveshare.vsliveshare-pack/license). A Microsoft license (instead of MIT, for example) makes it easier for us to license certain features of the product, such as access to the Visual Studio Marketplace (section 1.d), the re-licensing of third-party components (section 1.c), and telemetry data (section 4).
122
123
123
124
### Why aren't the Remote Development extensions or their components open source?
124
125
125
-
The Visual Studio Code Remote Development extensions and their related components will use an [open planning, issue, and feature request process](https://aka.ms/vscode-remote/feedback), but are not currently open-source. As with other servicebased extensions such as [Visual Studio LiveShare](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) and [IntelliCode](https://marketplace.visualstudio.com/items/VisualStudioExptTeam.vscodeintellicode), we have made the decision to keep them closed source.
126
+
The Visual Studio Code Remote Development extensions and their related components will use an [open planning, issue, and feature request process](https://aka.ms/vscode-remote/feedback), but are not currently open-source. As with other service-based extensions such as [Visual Studio LiveShare](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) and [IntelliCode](https://marketplace.visualstudio.com/items/VisualStudioExptTeam.vscodeintellicode), we have made the decision to keep them closed source.
126
127
127
128
### Will you charge for the extensions once they exit "Preview"?
128
129
129
-
No, they will remain free of charge. In the future, we may provide "premium" developer services which provide additional functionality, but the extensions will be free.
130
+
No, they will remain free of charge. In the future, we may provide "premium" developer services, which provide additional functionality, but the extensions will be free.
0 commit comments