This commit is contained in:
gregvanl 2022-10-06 11:02:17 -07:00
Родитель ff14c81ef2 cdc1b80a37
Коммит ba402b5732
124 изменённых файлов: 444 добавлений и 444 удалений

Просмотреть файл

@ -53,13 +53,13 @@ The extension development host window that appears will include your extension r
Follow these steps: Follow these steps:
1. To use a development container locally, [install and configure the Remote - Containers extension](/docs/remote/containers#_getting-started), and use **File > Open... / Open Folder...** to open your source code locally in VS Code. To use Codespaces instead, navigate to the repository that contains your extension on GitHub and [open it in a codespace](https://docs.github.com/github/developing-online-with-codespaces/creating-a-codespace) to work with it in a browser-based editor. You can also [open the codespace in VS Code](https://docs.github.com/en/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code) if you prefer. 1. To use a development container locally, [install and configure the Dev Containers extension](/docs/remote/containers#_getting-started), and use **File > Open... / Open Folder...** to open your source code locally in VS Code. To use Codespaces instead, navigate to the repository that contains your extension on GitHub and [open it in a codespace](https://docs.github.com/github/developing-online-with-codespaces/creating-a-codespace) to work with it in a browser-based editor. You can also [open the codespace in VS Code](https://docs.github.com/en/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code) if you prefer.
2. Select **Remote-Containers: Add Development Container Configuration Files...** or **Codespaces: Add Development Container Configuration Files...** from the Command Palette (`kbstyle(F1)`), and pick **Node.js & TypeScript** (or Node.js if you are not using TypeScript) to add the needed container configuration files. 2. Select **Dev Containers: Add Dev Container Configuration Files...** or **Codespaces: Add Dev Container Configuration Files...** from the Command Palette (`kbstyle(F1)`), and pick **Node.js & TypeScript** (or Node.js if you are not using TypeScript) to add the needed container configuration files.
3. **Optional:** After this command runs, you can modify the contents of the `.devcontainer` folder to include additional build or runtime requirements. See the in-depth [Remote - Containers](/docs/remote/create-dev-container#_set-up-a-folder-to-run-in-a-container) documentation for details. 3. **Optional:** After this command runs, you can modify the contents of the `.devcontainer` folder to include additional build or runtime requirements. See the in-depth [Dev Containers](/docs/remote/create-dev-container#_set-up-a-folder-to-run-in-a-container) documentation for details.
4. Run **Remote-Containers: Reopen Folder in Container** or **Codespaces: Add Development Container Configuration Files..** and in a moment, VS Code will set up the container and connect. You will now be able to develop your source code from inside the container just as you would in the local case. 4. Run **Dev Containers: Reopen in Container** or **Codespaces: Add Dev Container Configuration Files...** and in a moment, VS Code will set up the container and connect. You will now be able to develop your source code from inside the container just as you would in the local case.
5. Run `yarn install` or `npm install` in a new VS Code terminal window (`kb(workbench.action.terminal.new)`) to ensure the Linux versions Node.js native dependencies are installed. You can also install other OS or runtime dependencies, but you may want to add these to `.devcontainer/Dockerfile` as well so they are available if you rebuild the container. 5. Run `yarn install` or `npm install` in a new VS Code terminal window (`kb(workbench.action.terminal.new)`) to ensure the Linux versions Node.js native dependencies are installed. You can also install other OS or runtime dependencies, but you may want to add these to `.devcontainer/Dockerfile` as well so they are available if you rebuild the container.
@ -89,7 +89,7 @@ The extension development host window that appears will include your extension r
Follow these steps: Follow these steps:
1. After [installing and configuring the Remote - WSL extension](/docs/remote/wsl), select **Remote-WSL: New Window** from the Command Palette (`kbstyle(F1)`) in VS Code. 1. After [installing and configuring the WSL extension](/docs/remote/wsl), select **WSL: New Window** from the Command Palette (`kbstyle(F1)`) in VS Code.
2. In the new window that appears, either use **File > Open... / Open Folder...** to select the remote folder with your extension source code in it or select **Git: Clone** from the Command Palette (`kbstyle(F1)`) to clone it and open it in WSL. 2. In the new window that appears, either use **File > Open... / Open Folder...** to select the remote folder with your extension source code in it or select **Git: Clone** from the Command Palette (`kbstyle(F1)`) to clone it and open it in WSL.
@ -462,7 +462,7 @@ This is an important pattern for Remote Development and GitHub Codespaces to ens
The alternate pattern is to serve up web content in an `iframe` or have webview content directly interact with a localhost server. Unfortunately, by default, `localhost` inside a webview will resolve to a developer's local machine. This means that for a remotely running workspace extension, the webviews it creates would not be able to access local servers spawned by the extension. Even if you use the IP of the machine, the ports you are connecting to will typically be blocked by default in a cloud VM or a container. Even if this worked in VS Code, it would not work in the Codespaces browser-based editor. The alternate pattern is to serve up web content in an `iframe` or have webview content directly interact with a localhost server. Unfortunately, by default, `localhost` inside a webview will resolve to a developer's local machine. This means that for a remotely running workspace extension, the webviews it creates would not be able to access local servers spawned by the extension. Even if you use the IP of the machine, the ports you are connecting to will typically be blocked by default in a cloud VM or a container. Even if this worked in VS Code, it would not work in the Codespaces browser-based editor.
Here's an illustration of the problem when using the Remote - SSH extension, but the problem also exists for Remote - Containers and GitHub Codespaces: Here's an illustration of the problem when using the Remote - SSH extension, but the problem also exists for Dev Containers and GitHub Codespaces:
![Webview problem](images/remote-extensions/webview-problem.png) ![Webview problem](images/remote-extensions/webview-problem.png)

Просмотреть файл

@ -44,8 +44,8 @@ This contributes a task definition for `rake` tasks. The task definition has two
A task definition may optional have a `when` property. The `when` property specifies the condition under which task of this type will be available. The `when` property functions in the same way [as other places in VS Code](/api/references/when-clause-contexts), where there is a `when` property. The following contexts should always be considered when creating a task definition: A task definition may optional have a `when` property. The `when` property specifies the condition under which task of this type will be available. The `when` property functions in the same way [as other places in VS Code](/api/references/when-clause-contexts), where there is a `when` property. The following contexts should always be considered when creating a task definition:
- `shellExecutionSupported`: True when VS Code can run `ShellExecution` tasks, such as VS Code is run as a desktop application or when using one of the remote extensions, such as Remote Containers. - `shellExecutionSupported`: True when VS Code can run `ShellExecution` tasks, such as VS Code is run as a desktop application or when using one of the remote extensions, such as Dev Containers.
- `processExecutionSupported`: True when VS Code can run `ProcessExecution` tasks, such as VS Code is run as a desktop application or when using one of the remote extensions, such as Remote Containers. Currently, it will always have the same value as `shellExecutionSupported`. - `processExecutionSupported`: True when VS Code can run `ProcessExecution` tasks, such as VS Code is run as a desktop application or when using one of the remote extensions, such as Dev Containers. Currently, it will always have the same value as `shellExecutionSupported`.
- `customExecutionSupported`: True when VS Code can run `CustomExecution`. This is always true. - `customExecutionSupported`: True when VS Code can run `CustomExecution`. This is always true.
## Task provider ## Task provider

Просмотреть файл

@ -68,7 +68,7 @@ Over the past few months, we've been working hard re-establishing proper boundar
![Visual Studio Code Remote Extensions for WSL, Containers, and SSH](remote-extensions.png) ![Visual Studio Code Remote Extensions for WSL, Containers, and SSH](remote-extensions.png)
The **[Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)** extension lets you use the [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl) as a full development environment, right from VS Code. This new, optimized support lets you: The **[WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)** extension lets you use the [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl) as a full development environment, right from VS Code. This new, optimized support lets you:
* Use Windows to develop in a Linux-based environment, using platform-specific toolchains and utilities. * Use Windows to develop in a Linux-based environment, using platform-specific toolchains and utilities.
* Edit files located in WSL or the mounted Windows filesystem (for example `/mnt/c`). * Edit files located in WSL or the mounted Windows filesystem (for example `/mnt/c`).
@ -78,7 +78,7 @@ Commands and extensions are run directly in the Linux distro, so you don't have
Check out this quick, 2-minute video to see how easy it is to develop in WSL. Check out this quick, 2-minute video to see how easy it is to develop in WSL.
<iframe width="560" height="315" src="https://www.youtube.com/embed/mIHprjsSO9o" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen title="Visual Studio Code Remote - WSL"></iframe> <iframe width="560" height="315" src="https://www.youtube.com/embed/mIHprjsSO9o" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen title="Visual Studio Code WSL"></iframe>
For more information, please see the [Developing in WSL](https://aka.ms/vscode-remote/wsl) documentation. For more information, please see the [Developing in WSL](https://aka.ms/vscode-remote/wsl) documentation.
@ -102,7 +102,7 @@ For more information, please see the [Developing using SSH](https://aka.ms/vscod
--- ---
The **[Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)** extension lets you use a [Docker container](https://docker.com) as your [development container](https://aka.ms/vscode-remote/containers/folder-setup). Containers make great development environments because: The **[Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)** extension lets you use a [Docker container](https://docker.com) as your [development container](https://aka.ms/vscode-remote/containers/folder-setup). Containers make great development environments because:
* You can develop with a consistent and easily reproducible tool chain, on the same operating system you are deploying to. * You can develop with a consistent and easily reproducible tool chain, on the same operating system you are deploying to.
* Containers are isolated, meaning you can quickly swap between different development environments without impacting your local machine. * Containers are isolated, meaning you can quickly swap between different development environments without impacting your local machine.
@ -112,7 +112,7 @@ A `devcontainer.json` file can be used to tell VS Code how to configure the deve
Check out this quick, 2-minute video to see Development Containers in action. Check out this quick, 2-minute video to see Development Containers in action.
<iframe width="560" height="315" src="https://www.youtube.com/embed/TVcoGLL6Smo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen title="Visual Studio Code Remote - Containers"></iframe> <iframe width="560" height="315" src="https://www.youtube.com/embed/TVcoGLL6Smo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen title="Visual Studio Code Dev Containers"></iframe>
For more information on development containers, please see the [Developing inside a Container](https://aka.ms/vscode-remote/containers) documentation as well as the [vscode-remote-try-* repositories](https://github.com/search?q=org%3AMicrosoft+vscode-remote-try-&unscoped_q=vscode-remote-try-) that contain samples you can use today. For more information on development containers, please see the [Developing inside a Container](https://aka.ms/vscode-remote/containers) documentation as well as the [vscode-remote-try-* repositories](https://github.com/search?q=org%3AMicrosoft+vscode-remote-try-&unscoped_q=vscode-remote-try-) that contain samples you can use today.

Просмотреть файл

@ -184,7 +184,7 @@ To switch back to your local machine for local development, you close the remote
Using the Remote - SSH extension, you can work against a VM with all of VS Code's productivity features and extensions on your remote machine. You get the full-fledged development experience you know and love in VS Code, no matter where your code is hosted. Using the Remote - SSH extension, you can work against a VM with all of VS Code's productivity features and extensions on your remote machine. You get the full-fledged development experience you know and love in VS Code, no matter where your code is hosted.
If you want to learn more about VS Code Remote, you can read our [blog post announcing remote development](https://code.visualstudio.com/blogs/2019/05/02/remote-development). You can also try out the other remote extensions, [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and [Remote -WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl), and read our full [remote development documentation](https://code.visualstudio.com/docs/remote/remote-overview). If you want to learn more about VS Code Remote, you can read our [blog post announcing remote development](https://code.visualstudio.com/blogs/2019/05/02/remote-development). You can also try out the other remote extensions, [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl), and read our full [remote development documentation](https://code.visualstudio.com/docs/remote/remote-overview).
Happy Remote Coding, Happy Remote Coding,

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:59381c5fe3ad23ac55329ee2e6184e16f5ce4b92df8559c82a1f333b33c9c5e2 oid sha256:2fd724eb2152d18afe904cbc22886b13271321930dfba13c525e9cfd824b82e2
size 71269 size 69387

Просмотреть файл

@ -26,9 +26,9 @@ All of this translates to increased IO performance – up to 20x faster compared
If you're following along, make sure you've opted into Windows Insiders builds and enabled WSL 2. You can learn more about how to get started in the [Installation instructions for WSL 2](https://learn.microsoft.com/windows/wsl/install). If you're following along, make sure you've opted into Windows Insiders builds and enabled WSL 2. You can learn more about how to get started in the [Installation instructions for WSL 2](https://learn.microsoft.com/windows/wsl/install).
You'll also need to install [Visual Studio Code](https://code.visualstudio.com/download) and the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). Optionally, check out the [beta Windows Terminal](https://www.microsoft.com/p/windows-terminal-preview/9n0dx20hk701) for the best possible terminal experience on Windows. You'll also need to install [Visual Studio Code](https://code.visualstudio.com/download) and the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). Optionally, check out the [beta Windows Terminal](https://www.microsoft.com/p/windows-terminal-preview/9n0dx20hk701) for the best possible terminal experience on Windows.
![Remote - WSL extension](remote-wsl-extension.png) ![WSL extension](remote-wsl-extension.png)
Open WSL either by launching the Windows Terminal and creating a new WSL tab or by launching the Linux distro that you installed. You can also switch into Linux directly from the Command Prompt or PowerShell by entering `wsl` in the terminal - that's just one of the many ways WSL is so deeply integrated into Windows. You can also use WSL inline to do ridiculous things like… Open WSL either by launching the Windows Terminal and creating a new WSL tab or by launching the Linux distro that you installed. You can also switch into Linux directly from the Command Prompt or PowerShell by entering `wsl` in the terminal - that's just one of the many ways WSL is so deeply integrated into Windows. You can also use WSL inline to do ridiculous things like…
@ -42,11 +42,11 @@ Here's a look at my setup.
![Matt's WSL 2 setup](matts-setup.png) ![Matt's WSL 2 setup](matts-setup.png)
Notice in the screenshot that I'm connected to my WSL 2 instance (see 'Ubuntu-18.04' in the bottom-left as the remote source) and I've started a Node.js app from the debugger and it's at a breakpoint. In the Debug console, I've entered `process.platform` to show how the Remote - WSL extension defaults all editor interaction to the Linux environment. There is absolutely no configuration required to get this working, just connect to your WSL environment from the Remote - WSL extension and get to work. Also notice that my line endings are defaulted to LF (shown in the Status bar) without having to set any additional Git configuration options - if you're on Windows working in open source, you understand why this is a big deal. Notice in the screenshot that I'm connected to my WSL 2 instance (see 'Ubuntu-18.04' in the bottom-left as the remote source) and I've started a Node.js app from the debugger and it's at a breakpoint. In the Debug console, I've entered `process.platform` to show how the WSL extension defaults all editor interaction to the Linux environment. There is absolutely no configuration required to get this working, just connect to your WSL environment from the WSL extension and get to work. Also notice that my line endings are defaulted to LF (shown in the Status bar) without having to set any additional Git configuration options - if you're on Windows working in open source, you understand why this is a big deal.
All my favorite extensions work and are targeting the correct environment. For example, the Source Control view is showing changes to my project using the version of Git that's installed in WSL 2 and the [Docker extension is configured](https://github.com/microsoft/vscode-docker/wiki/Docker-on-WSL-2) to access the Docker Desktop WSL 2 technical preview. All my favorite extensions work and are targeting the correct environment. For example, the Source Control view is showing changes to my project using the version of Git that's installed in WSL 2 and the [Docker extension is configured](https://github.com/microsoft/vscode-docker/wiki/Docker-on-WSL-2) to access the Docker Desktop WSL 2 technical preview.
All of this is made possible by using the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). Editing, debugging, and even extensions all work exactly the way you've come to expect in your favorite editor. All of this is made possible by using the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). Editing, debugging, and even extensions all work exactly the way you've come to expect in your favorite editor.
## Benefits of WSL 2 ## Benefits of WSL 2
@ -56,7 +56,7 @@ To recap:
* The original WSL was very connected, but had fairly poor performance compared to a VM. * The original WSL was very connected, but had fairly poor performance compared to a VM.
* WSL 2 brings a hybrid approach with a lightweight VM, a completely connected experience, and high performance. * WSL 2 brings a hybrid approach with a lightweight VM, a completely connected experience, and high performance.
Add in the Remote - WSL extension in Visual Studio Code and you have the best of all worlds – Linux and Windows compatibility for your tools with excellent performance and a seamless development experience. Add in the WSL extension in Visual Studio Code and you have the best of all worlds – Linux and Windows compatibility for your tools with excellent performance and a seamless development experience.
## Further reading ## Further reading

Просмотреть файл

@ -20,11 +20,11 @@ This technique allows you to inspect the container environment via the command l
In this post, we'll look at how you can attach Visual Studio Code to your container so that you can use the full power of VS Code, including debugging, to inspect the container, figure out what is going wrong, and fix it. In this post, we'll look at how you can attach Visual Studio Code to your container so that you can use the full power of VS Code, including debugging, to inspect the container, figure out what is going wrong, and fix it.
The [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers), which launched in May of this year, allows you to connect your local VS Code to a container host while maintaining all of your personalized settings, themes, and key bindings. The [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers), which launched in May of this year, allows you to connect your local VS Code to a container host while maintaining all of your personalized settings, themes, and key bindings.
## Prerequisites ## Prerequisites
This blog post presumes you have [Docker Desktop](https://www.docker.com/products/docker-desktop) and [Visual Studio Code](https://code.visualstudio.com/download) installed. You will also need the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). To install the Remote - Containers extension, open the Extensions view (`kb(workbench.view.extensions)`), search for "Remote Containers", select **Install**, and restart VS Code if prompted. This blog post presumes you have [Docker Desktop](https://www.docker.com/products/docker-desktop) and [Visual Studio Code](https://code.visualstudio.com/download) installed. You will also need the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). To install the Dev Containers extension, open the Extensions view (`kb(workbench.view.extensions)`), search for "Dev Containers", select **Install**, and restart VS Code if prompted.
## The application ## The application
@ -58,7 +58,7 @@ And, you should be able to navigate to [http://localhost:3000](http://localhost:
## Attach to the container ## Attach to the container
We can now use the Remote - Containers extension to attach to our running container, inspect the environment, and debug the application. We can now use the Dev Containers extension to attach to our running container, inspect the environment, and debug the application.
Select the Remote Explorer in the Activity Bar to see a list of running containers that you can attach to in the **Other Containers** section. Find the container we just started, it has the name 'express_server_1', and then attach to it by using the **Connect to Container** button. That container should now be displayed in the **Attached Containers** section of the Remote Explorer. Select the Remote Explorer in the Activity Bar to see a list of running containers that you can attach to in the **Other Containers** section. Find the container we just started, it has the name 'express_server_1', and then attach to it by using the **Connect to Container** button. That container should now be displayed in the **Attached Containers** section of the Remote Explorer.
@ -70,7 +70,7 @@ This will launch a new VS Code window (instance) that has the following notifica
During this time, VS Code is installing an instance of the VS Code **Server** inside the container where your app is running. To see more details and progress about this installation step, you can select the **details** link that is shown in the notification. Once the VS Code server is installed, your local VS Code client will connect to the remote VS Code server. The result is your local instance of VS Code, with all your settings, themes, and key bindings, is connected to a "back-end" running inside the container alongside your application. During this time, VS Code is installing an instance of the VS Code **Server** inside the container where your app is running. To see more details and progress about this installation step, you can select the **details** link that is shown in the notification. Once the VS Code server is installed, your local VS Code client will connect to the remote VS Code server. The result is your local instance of VS Code, with all your settings, themes, and key bindings, is connected to a "back-end" running inside the container alongside your application.
![Remote Container architecture diagram](remote-container-architecture.png) ![Dev Containers architecture diagram](remote-container-architecture.png)
Once the connection is complete, you should have a new VS Code window with a green indicator in the bottom left that shows this instance of VS Code is running in a remote context. If you click on the indicator, you see will see a dropdown of commands relevant to the current remote context. Once the connection is complete, you should have a new VS Code window with a green indicator in the bottom left that shows this instance of VS Code is running in a remote context. If you click on the indicator, you see will see a dropdown of commands relevant to the current remote context.
@ -82,7 +82,7 @@ Let's go ahead and open our app by selecting the **Open Folder** button and navi
Once you have opened your source folder, you'll notice that a file has been opened in your editor with the file name `express-server.json`. This name is derived from the container image name that you have attached to. In our example, docker-compose creates the image name 'express_server', which is derived from the folder name `express` and the service name `server` defined in the `docker-compose.yml` file. This file is a configuration file associated with your image that will remember configuration settings when you attach to containers based on this image. If you don't have Auto Save on, you'll need to make sure to save this file. Now in future sessions, VS Code will reopen this source folder when you attach to this image. Once you have opened your source folder, you'll notice that a file has been opened in your editor with the file name `express-server.json`. This name is derived from the container image name that you have attached to. In our example, docker-compose creates the image name 'express_server', which is derived from the folder name `express` and the service name `server` defined in the `docker-compose.yml` file. This file is a configuration file associated with your image that will remember configuration settings when you attach to containers based on this image. If you don't have Auto Save on, you'll need to make sure to save this file. Now in future sessions, VS Code will reopen this source folder when you attach to this image.
>**Note**: You can view this file for the current remote container by running the command **Open Container Configuration File** from the Command Palette (`kb(workbench.action.showCommands)`). >**Note**: You can view this file for the current dev container by running the command **Open Container Configuration File** from the Command Palette (`kb(workbench.action.showCommands)`).
![express-server.json file contents](express-server-json.png) ![express-server.json file contents](express-server-json.png)
@ -96,7 +96,7 @@ For example, open `app.js`. Right click on line 8 and execute **Find All Referen
## Debug inside the container ## Debug inside the container
To further show how similar the remote container is to a local environment, let's attach a debugger. We started our Node app with the `–inspect` parameter in `docker-compose.yaml`, so all we have to do is attach a debugger to that process. To further show how similar the dev container is to a local environment, let's attach a debugger. We started our Node app with the `–inspect` parameter in `docker-compose.yaml`, so all we have to do is attach a debugger to that process.
In the Command Palette (`kb(workbench.action.showCommands)`), search for and select **Debug: Attach to Node Process**. There will probably be several Node processes running inside the container. We want the process that is running our application, so select the one that shows `bin/www`. In the Command Palette (`kb(workbench.action.showCommands)`), search for and select **Debug: Attach to Node Process**. There will probably be several Node processes running inside the container. We want the process that is running our application, so select the one that shows `bin/www`.
@ -112,7 +112,7 @@ Now go to [http://localhost:3000](http://localhost:3000) in your browser and see
## Install extensions ## Install extensions
Just like a normal instance of VS Code, you can install and use extensions while attached to a remote container. Just like a normal instance of VS Code, you can install and use extensions while attached to a dev container.
Depending on the type of extension, it can either run on the client side or in the container on the remote VS Code server. Extensions that are primarily UI-based such as themes and snippets stay on the client side, while all other extensions are installed in the container. This allows you to have only the extensions you need when working in each environment while maintaining a consist UI across all environments. Depending on the type of extension, it can either run on the client side or in the container on the remote VS Code server. Extensions that are primarily UI-based such as themes and snippets stay on the client side, while all other extensions are installed in the container. This allows you to have only the extensions you need when working in each environment while maintaining a consist UI across all environments.
@ -155,11 +155,11 @@ Now you're ready to spin up another container and work on another project!
## Next steps ## Next steps
In this blog post, we covered how you can use the Remote - Containers extension to attach to your existing containerized applications. In this blog post, we covered how you can use the Dev Containers extension to attach to your existing containerized applications.
You can also create a [devcontainer.json](https://code.visualstudio.com/docs/remote/containers#_creating-a-devcontainerjson-file), which describes the development environment you want to create or attach to and lives with your project to share with your team members. You can also create a [devcontainer.json](https://code.visualstudio.com/docs/remote/containers#_creating-a-devcontainerjson-file), which describes the development environment you want to create or attach to and lives with your project to share with your team members.
Other useful resources include the full [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers) documentation, [Advanced container configuration](https://code.visualstudio.com/remote/advancedcontainers/overview), and our [Introductory tutorial](https://code.visualstudio.com/docs/remote/containers-tutorial) on building isolated development environments with the Remote - Containers extension. Other useful resources include the full [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers) documentation, [Advanced container configuration](https://code.visualstudio.com/remote/advancedcontainers/overview), and our [Introductory tutorial](https://code.visualstudio.com/docs/remote/containers-tutorial) on building isolated development environments with the Dev Containers extension.
Happy Remote Coding, Happy Remote Coding,

Просмотреть файл

@ -32,7 +32,7 @@ First some prerequisites:
* Install Windows 10 Insider Preview build 18975 (Slow) or later for WSL 2. * Install Windows 10 Insider Preview build 18975 (Slow) or later for WSL 2.
* Install Ubuntu from the [Microsoft store](https://www.microsoft.com/p/ubuntu/9nblggh4msv6). * Install Ubuntu from the [Microsoft store](https://www.microsoft.com/p/ubuntu/9nblggh4msv6).
* Enable WSL 2 by following this [guide](https://learn.microsoft.com/windows/wsl/install). * Enable WSL 2 by following this [guide](https://learn.microsoft.com/windows/wsl/install).
* Install the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension for VS Code. * Install the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension for VS Code.
* Install the [Docker WSL 2 Technical Preview](https://docs.docker.com/docker-for-windows/wsl-tech-preview/#download). * Install the [Docker WSL 2 Technical Preview](https://docs.docker.com/docker-for-windows/wsl-tech-preview/#download).
Once installed, Docker will recognize that you have WSL installed and prompt to enable WSL integration. You want to **Enable WSL integration** for this tutorial. Once installed, Docker will recognize that you have WSL installed and prompt to enable WSL integration. You want to **Enable WSL integration** for this tutorial.
@ -55,7 +55,7 @@ Running the `docker ps` command over in WSL, you'll see the container as expecte
## Using VS Code ## Using VS Code
With this set up and running, you can install the VS Code [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) extension and access your containers. If you're already running WSL 2 and the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, this will help you get Docker integrated into your WSL workflow rather than switching contexts when you need containers. And because the Docker CLI's context is set to use DockerD in WSL, the extension will work with your containers regardless of whether you opened VS Code using the Remote - WSL extension. With this set up and running, you can install the VS Code [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) extension and access your containers. If you're already running WSL 2 and the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, this will help you get Docker integrated into your WSL workflow rather than switching contexts when you need containers. And because the Docker CLI's context is set to use DockerD in WSL, the extension will work with your containers regardless of whether you opened VS Code using the WSL extension.
Notice how in the screenshot below, I'm connected and working in WSL and still building/running containers without changing from my preferred environment (zsh in Ubuntu). Notice how in the screenshot below, I'm connected and working in WSL and still building/running containers without changing from my preferred environment (zsh in Ubuntu).
@ -63,7 +63,7 @@ Notice how in the screenshot below, I'm connected and working in WSL and still b
*Theme: Noctis Sereno* *Theme: Noctis Sereno*
I've personally noticed a vast improvement in container execution times using this configuration and each part of my typical development workflow remains the same. I'm also using the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension within WSL for testing specific environments without setting things up directly on my machine. I've personally noticed a vast improvement in container execution times using this configuration and each part of my typical development workflow remains the same. I'm also using the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension within WSL for testing specific environments without setting things up directly on my machine.
## We want your feedback ## We want your feedback

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:a134a7b3702110d882e663840a9cb6f4c0753c1da45652e3193c6a65e566016e oid sha256:2732ae42cd101be46b64795d70384602da3e89531a9ae288886191ede139360e
size 45041 size 47585

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0fd321c6f062636d90c131a4ba2235f5821c49e8ebdd15a5d93c755d2b598a96 oid sha256:6525e02381dd675a936490877c6748a98020ee1e6a4782edacab60623a415c11
size 17419 size 10148

Просмотреть файл

@ -1,12 +1,12 @@
--- ---
Order: 59 Order: 59
TOCTitle: Remote Containers in WSL 2 TOCTitle: Dev Containers in WSL 2
PageTitle: Using Remote Containers in WSL 2 PageTitle: Using Dev Containers in WSL 2
MetaDescription: Using Remote Containers in WSL 2 MetaDescription: Using Dev Containers in WSL 2
Date: 2020-07-01 Date: 2020-07-01
Author: Brigit Murtaugh Author: Brigit Murtaugh
--- ---
# Using Remote Containers in WSL 2 # Using Dev Containers in WSL 2
July 1, 2020 by Brigit Murtaugh, [@BrigitMurtaugh](https://twitter.com/BrigitMurtaugh) July 1, 2020 by Brigit Murtaugh, [@BrigitMurtaugh](https://twitter.com/BrigitMurtaugh)
@ -16,7 +16,7 @@ May brought us a couple of exciting announcements in the world of virtualization
In [earlier blog posts](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2), we've explored how to use Docker in WSL 2. The first requirement was to install Windows Insiders, as WSL 2 support was not yet part of stable Windows releases, and the next was to install a Tech Preview of Docker WSL 2. Now, both Windows WSL 2 and Docker support are in stable GA releases! In [earlier blog posts](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2), we've explored how to use Docker in WSL 2. The first requirement was to install Windows Insiders, as WSL 2 support was not yet part of stable Windows releases, and the next was to install a Tech Preview of Docker WSL 2. Now, both Windows WSL 2 and Docker support are in stable GA releases!
In this post, we'll take a look at how both of these tools work, and how you can leverage them in Visual Studio Code to productively use remote containers in WSL 2. In this post, we'll take a look at how both of these tools work, and how you can leverage them in Visual Studio Code to productively use dev containers in WSL 2.
## New era of virtualization ## New era of virtualization
@ -34,7 +34,7 @@ In WSL 1, due to fundamental differences between Windows and Linux, the Docker E
The new May 2020 version of Docker Desktop can build containers much faster and consume fewer resources as it leverages WSL 2's dynamic memory allocation. It can take less than 10 seconds to cold start, as opposed to almost a minute in the previous version. Additionally, Hyper-V isn't a requirement anymore, so the steps detailed in this post work on Windows 10 Home. The new May 2020 version of Docker Desktop can build containers much faster and consume fewer resources as it leverages WSL 2's dynamic memory allocation. It can take less than 10 seconds to cold start, as opposed to almost a minute in the previous version. Additionally, Hyper-V isn't a requirement anymore, so the steps detailed in this post work on Windows 10 Home.
Since WSL 2 in Windows and Docker Desktop is now GA, you can feel even more confident using your remote containers in WSL 2. Since WSL 2 in Windows and Docker Desktop is now GA, you can feel even more confident using your dev containers in WSL 2.
## Getting started ## Getting started
@ -59,9 +59,9 @@ Let's connect VS Code to our WSL 2 engine. Open an Ubuntu terminal, navigate to
![Launch code . from Ubuntu terminal](2-ubuntu-launch.png) ![Launch code . from Ubuntu terminal](2-ubuntu-launch.png)
Once VS Code opens, it recognizes that we have WSL installed, and recommends we install the[Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)extension. I'll select **Install**: Once VS Code opens, it recognizes that we have WSL installed, and recommends we install the[WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)extension. I'll select **Install**:
![Remote - WSL extension recommended](3-wsl-extension-recommended.png) ![WSL extension recommended](3-wsl-extension-recommended.png)
After installing the extension, we can reload VS Code to connect to WSL 2: After installing the extension, we can reload VS Code to connect to WSL 2:
@ -71,13 +71,14 @@ Once we've reloaded, we can confirm that we're connected to Ubuntu by checking t
![WSL: Ubuntu bottom left indicator](5-wsl-left-indicator.png) ![WSL: Ubuntu bottom left indicator](5-wsl-left-indicator.png)
Installing the Remote - WSL extension added the Remote Explorer to VS Code. When we look inside the Explorer, we can see information about our Linux distros: Installing the WSL extension added the Remote Explorer to VS Code. When we look inside the Explorer, we can see information about our Linux distros:
![Remote Explorer with WSL Targets](6-remote-explorer-wsl-targets.png) ![Remote Explorer with WSL Targets](6-remote-explorer-wsl-targets.png)
## Working with containers ## Working with containers
We can leverage the [Remote - Containers](https://code.visualstudio.com/docs/remote/containers) extension to view and attach to containers, in addition to a variety of other scenarios, such as: We can leverage the [Dev Containers](https://code.visualstudio.com/docs/remote/containers) extension to view and attach to containers, in addition to a variety of other scenarios, such as:
* [Developing within a set of sample containers](https://code.visualstudio.com/docs/remote/containers-tutorial) * [Developing within a set of sample containers](https://code.visualstudio.com/docs/remote/containers-tutorial)
* [Opening existing source code in a container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container) * [Opening existing source code in a container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container)
* [Working with a GitHub repository](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume) in an isolated container volume. * [Working with a GitHub repository](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume) in an isolated container volume.
@ -86,11 +87,11 @@ These configurations allow you to easily recreate the same development environme
While you can access source code from both Windows and the WSL 2 filesystem when using the WSL 2 engine, we recommend using the WSL 2 file system because [performance is much better](https://www.docker.com/blog/docker-desktop-wsl-2-best-practices/). Since the performance is better when using the filesystem inside WSL 2, let's walk through how to use it. While you can access source code from both Windows and the WSL 2 filesystem when using the WSL 2 engine, we recommend using the WSL 2 file system because [performance is much better](https://www.docker.com/blog/docker-desktop-wsl-2-best-practices/). Since the performance is better when using the filesystem inside WSL 2, let's walk through how to use it.
We need to select the folder we want to open in a container. First, make sure you've installed the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. We can then call the**Remote-Containers: Reopen Folder in Container**command from a folder already opened using theRemote - WSLextension. We need to select the folder we want to open in a container. First, make sure you've installed the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. We can then call the**Dev Containers: Reopen in Container**command from a folder already opened using theWSLextension.
I have an existing HelloNode folder on my WSL 2 filesystem with my Node project in it. I'll select: **Remote-Containers: Reopen in Container…**: I have an existing HelloNode folder on my WSL 2 filesystem with my Node project in it. I'll select: **Dev Containers: Reopen in Container**:
![Command Palette: Remote-Containers: Reopen in Container...](7-reopen-container.png) ![Command Palette: Dev Containers: Reopen in Container](7-reopen-container.png)
A list of container definitions will appear, since there is no DevContainer configuration in the repository yet. The list of container configuration definitions that appears is filtered based on my project type. I'll select **Node.js 14**: A list of container definitions will appear, since there is no DevContainer configuration in the repository yet. The list of container configuration definitions that appears is filtered based on my project type. I'll select **Node.js 14**:

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b321a3311fdad6a63f2c07e5e679936a31f30d259407aa1b280c235839a5238e oid sha256:fcacf3fe92c8ac4c7c115002b9a4290ecceda61708e61a020c67eee75c7216d1
size 23223 size 11279

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:00e1b0a1e19fde95dcff0db8e587967ee1ff20ea1ea1abd0d5722d939086de52 oid sha256:d679715cc32460ee2ac60bed624db7360eea81539b581add78d8ba75ba2eb705
size 195163 size 124457

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c42699499458eeb9e9823a04311d9502296c5012b7371cabe498175ecfca0059 oid sha256:567e7caf559c7b10526ed65d8ffac4fc360aa8ddca660c0c9d504fd5152c3611
size 80781 size 54184

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9623984d58c7d3ac2cfd8dc3c81df1e06b7f2046cf28cec94f11c76ff82cd722 oid sha256:d392ef6cebe29e89bece4844addd2edf02f98639a985d90ba81412135572be8d
size 19465 size 25345

Просмотреть файл

@ -30,9 +30,9 @@ Dev containers provide a separate coding environment from your computer. For exa
As an instructor, you can create a specific image for an assignment. Each student will get the exact same version of dependencies, such as the same version of Python or a C++ compiler, regardless of their operating system or any other files already installed on their computer. As an instructor, you can create a specific image for an assignment. Each student will get the exact same version of dependencies, such as the same version of Python or a C++ compiler, regardless of their operating system or any other files already installed on their computer.
## Remote – Containers in VS Code ## Developement Containers in VS Code
The Visual Studio Code [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension lets you use a container as your main coding environment. In the classroom, an instructor can take an [existing dev container](https://github.com/microsoft/vscode-dev-containers/tree/main/containers), or create their own, and share it with the class. Each student can open the container in VS Code and automatically have the tools and runtimes they need to develop their applications. Students will also have access to VS Code's full feature set, including IntelliSense and debugging, while coding. The Visual Studio Code [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension lets you use a container as your main coding environment. In the classroom, an instructor can take an [existing dev container](https://github.com/microsoft/vscode-dev-containers/tree/main/containers), or create their own, and share it with the class. Each student can open the container in VS Code and automatically have the tools and runtimes they need to develop their applications. Students will also have access to VS Code's full feature set, including IntelliSense and debugging, while coding.
The Remote – Containers extension works solely with Linux-based containers, so although students may have different operating systems on their computers, the coding environment will be consistent across all of them. The Remote – Containers extension works solely with Linux-based containers, so although students may have different operating systems on their computers, the coding environment will be consistent across all of them.
@ -62,15 +62,15 @@ Let's start off by launching VS Code, which we can do by typing `code` in the co
![Launch VS Code from command prompt](2-code-ps-cropped.png) ![Launch VS Code from command prompt](2-code-ps-cropped.png)
Once VS Code launches, ensure you've installed the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension: Once VS Code launches, ensure you've installed the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension:
![Remote containers extension](3-extension.png) ![Dev Containers extension](3-extension.png)
When we install any of the Remote extensions, the green Remote indicator is added to the bottom left of the Status bar: When we install any of the Remote extensions, the green Remote indicator is added to the bottom left of the Status bar:
![Remote indicator in VS Code](4-remote-indicator.png) ![Remote indicator in VS Code](4-remote-indicator.png)
You can click on it to open the Command Palette and verify the Remote-Containers commands are listed: You can click on it to open the Command Palette and verify the Dev Containers commands are listed:
![List of remote commands in Command Palette](5-commands-list.png) ![List of remote commands in Command Palette](5-commands-list.png)
@ -80,7 +80,7 @@ Let's walk through an example dev container to help students get a consistent co
We have an example [vscode-course-sample GitHub repo](https://github.com/microsoft/vscode-course-sample) with a Python dev container and two Python intro assignments. Let's open it in VS Code. We have an example [vscode-course-sample GitHub repo](https://github.com/microsoft/vscode-course-sample) with a Python dev container and two Python intro assignments. Let's open it in VS Code.
You can select the Remote indicator in the bottom left, or use the Command Palette, to bring up the Remote-Containers commands. You can select the Remote indicator in the bottom left, or use the Command Palette, to bring up the Dev Containers commands.
Let's call **Clone Repository in Container Volume...** Let's call **Clone Repository in Container Volume...**
@ -120,15 +120,15 @@ Now that we've seen a fantastic example of a container, let's set up our first c
![Hello world Python app](14-helloworld-cropped.png) ![Hello world Python app](14-helloworld-cropped.png)
We'll select **Remote-Containers: Add Development Container Configuration Files…** to begin setting up the files necessary for a development container: We'll select **Dev Containers: Add Dev Container Configuration Files…** to begin setting up the files necessary for a development container:
![Add Development Container Configuration Files command](15-add-config.png) ![Add Dev Container Configuration Files command](15-add-config.png)
Container configuration files are what's needed to create and customize a development container. The list of [container definitions](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3) that appears is filtered based on the contents of your application, which in our case is a Python file. Let's select **Python 3**: Container configuration files are what's needed to create and customize a development container. The list of [container definitions](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3) that appears is filtered based on the contents of your application, which in our case is a Python file. Let's select **Python 3**:
![Select Python 3 config file in Command Palette](16-python-config.png) ![Select Python 3 config file in Command Palette](16-python-config.png)
The Remote - Containers extension automatically adds a `.devcontainer` folder and two configuration files within it: `devcontainer.json` and a Dockerfile. Let's take a closer look at both files. The Dev Containers extension automatically adds a `.devcontainer` folder and two configuration files within it: `devcontainer.json` and a Dockerfile. Let's take a closer look at both files.
#### devcontainer.json #### devcontainer.json

Просмотреть файл

@ -128,7 +128,7 @@ To smooth my workflow, I have the `"security.workspace.trust.startupPrompt"` set
With this setting, I am not prompted by the modal dialog and the workspace opens directly in Restricted Mode. I've already decided that the `~src/scratch` folder is untrusted, so there is no need to prompt me every time I open a subfolder. If I decide that I do trust the code I'm reading or writing, I can enable it on the folder with two quick clicks (the Restricted Mode notification across the top of VS Code, then the Trust button). With this setting, I am not prompted by the modal dialog and the workspace opens directly in Restricted Mode. I've already decided that the `~src/scratch` folder is untrusted, so there is no need to prompt me every time I open a subfolder. If I decide that I do trust the code I'm reading or writing, I can enable it on the folder with two quick clicks (the Restricted Mode notification across the top of VS Code, then the Trust button).
On my Windows machine, things are a little more interesting. I generally work in Ubuntu images running on the Windows Subsystem for Linux (WSL), using the [Remote WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). I trust the `~/src` folders on Linux and I trust the `d:\src` folder on the Windows side. On my Windows machine, things are a little more interesting. I generally work in Ubuntu images running on the Windows Subsystem for Linux (WSL), using the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). I trust the `~/src` folders on Linux and I trust the `d:\src` folder on the Windows side.
![Trust Folders & Workspaces list with WSL trusted folders](trust-folders-and-workspaces-list.png) ![Trust Folders & Workspaces list with WSL trusted folders](trust-folders-and-workspaces-list.png)

Просмотреть файл

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8619442cc01277917cd275e84ba7bc7aef3baf69cd66d9eb3f97d58106225f8
size 44703

Просмотреть файл

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8ce199ceb26320d0807f4aa22ae060609423089dd1a900b546b7daa836f285e9
size 36128

Просмотреть файл

@ -17,7 +17,7 @@ As it turns out making a great tutorial isn't about **what** you write, it's abo
## Nobody reads ## Nobody reads
Our very own tutorial on [how to use Remote Containers in Visual Studio Code](https://learn.microsoft.com/training/modules/use-docker-container-dev-env-vs-code/) has long had low completion rates - about 4 - 6%. Our very own tutorial on [how to use Dev Containers in Visual Studio Code](https://learn.microsoft.com/training/modules/use-docker-container-dev-env-vs-code/) has long had low completion rates - about 4 - 6%.
![dev containers learn module screenshot](dev-containers-tutorial-screenshot.png) ![dev containers learn module screenshot](dev-containers-tutorial-screenshot.png)
@ -39,9 +39,9 @@ The idea behind containerized dev environments is that you develop inside of a [
But how do you develop **inside** of a container? It's not like containers have a UI where you can just launch VS Code. But how do you develop **inside** of a container? It's not like containers have a UI where you can just launch VS Code.
The [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for VS Code does exactly this. It contains both the mechanism for configuring a Docker container as a dev environment, as well as allowing you to connect to that environment from VS Code. It does this by installing a small server component within the container that your local VS Code talks to. You then develop just like you would if you were local, but VS Code is attached to the container environment instead of your local environment. The [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension for VS Code does exactly this. It contains both the mechanism for configuring a Docker container as a dev environment, as well as allowing you to connect to that environment from VS Code. It does this by installing a small server component within the container that your local VS Code talks to. You then develop just like you would if you were local, but VS Code is attached to the container environment instead of your local environment.
![The remote containers extension screenshot from extension gallery](remote-containers-extension.png) ![The Dev Containers extension screenshot from extension gallery](dev-containers-extension.png)
In order to create a containerized dev environment, you would ordinarily have to know a thing or two about Docker. A lot of people do, but a lot of people **don't** (you can't see me, but my hand is in the air), so the extension tries to abstract the container setup process away as much as possible. I set up a new Python container. A wizard walks you through selecting the base image and Python version. It then gives you the opportunity to add additional software to the image via a picker list. In this case, I add the Azure CLI, Dotnet CLI and PowerShell… In order to create a containerized dev environment, you would ordinarily have to know a thing or two about Docker. A lot of people do, but a lot of people **don't** (you can't see me, but my hand is in the air), so the extension tries to abstract the container setup process away as much as possible. I set up a new Python container. A wizard walks you through selecting the base image and Python version. It then gives you the opportunity to add additional software to the image via a picker list. In this case, I add the Azure CLI, Dotnet CLI and PowerShell…
@ -83,9 +83,9 @@ If you connect an interactive terminal to the `sail-8.1/app container`, you'll s
![The file structure of the Laravel project in a container](container-file-structure.png) ![The file structure of the Laravel project in a container](container-file-structure.png)
## Adding Remote Containers ## Adding Dev Containers
Support has also been added for the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. To add the proper dev container configuration to this project, you can scaffold the same project and add the `&devcontainer` flag. Support has also been added for the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. To add the proper dev container configuration to this project, you can scaffold the same project and add the `&devcontainer` flag.
```bash ```bash
curl -s "https://laravel.build/example-app?with=mysql,redis&devcontainer" | bash curl -s "https://laravel.build/example-app?with=mysql,redis&devcontainer" | bash
@ -109,11 +109,11 @@ When connected to the container, the context you are developing in is the same a
![The VS Code terminal connected to the running container instance](terminal.png) ![The VS Code terminal connected to the running container instance](terminal.png)
The Remote - Containers extension also gives you a more complete view of what's going on, such as which ports are forwarded - just in case you forget where your application is running. The Dev Containers extension also gives you a more complete view of what's going on, such as which ports are forwarded - just in case you forget where your application is running.
![The port forwarding view in VS Code showing port 80 forwarded](port-forwarding.png) ![The port forwarding view in VS Code showing port 80 forwarded](port-forwarding.png)
The Laravel application starts automatically, and the application logs are piped to the container logs. Since you probably want to see what's going on in the application, the Remote - Containers extension provides a new view in VS Code, where you can see all running containers, as well as connect to stream container logs. The Laravel application starts automatically, and the application logs are piped to the container logs. Since you probably want to see what's going on in the application, the Dev Containers extension provides a new view in VS Code, where you can see all running containers, as well as connect to stream container logs.
![The Laravel application container logs in VS Code](container-logs.png) ![The Laravel application container logs in VS Code](container-logs.png)

Просмотреть файл

@ -77,7 +77,7 @@ VS Code's entry into this space comes from powering [GitHub Codespaces](https://
![A diagram showing the infrastructure and workflow of Codespaces](codespaces-diagram.png) ![A diagram showing the infrastructure and workflow of Codespaces](codespaces-diagram.png)
The same dev containers used in the Remote - Containers extension can be used in GitHub Codespaces, providing a seamless transition to the cloud. The same dev containers used in the Dev Containers extension can be used in GitHub Codespaces, providing a seamless transition to the cloud.
But remember all of those scary possibilities of the cloud? Well, GitHub Codespaces alleviates those issues by leveraging GitHub's cloud features. Codespaces run on compute options hosted on GitHub.com, and the feature is currently available for developers using [GitHub Team or GitHub Enterprise Cloud](https://docs.github.com/get-started/learning-about-github/githubs-products). But remember all of those scary possibilities of the cloud? Well, GitHub Codespaces alleviates those issues by leveraging GitHub's cloud features. Codespaces run on compute options hosted on GitHub.com, and the feature is currently available for developers using [GitHub Team or GitHub Enterprise Cloud](https://docs.github.com/get-started/learning-about-github/githubs-products).
@ -87,7 +87,7 @@ With the power of VS Code, GitHub, and dev containers, GitHub Codespaces provide
## What's next? ## What's next?
As developers, we want to spend more time developing software and less time on headache-inducing configuration. Trends in the industry can, and should, be used to empower developers to increase their productivity. We've explored how containers and the cloud can take us to the next level, and you can [get started with the Remote - Containers extension](https://code.visualstudio.com/docs/remote/containers) to see for yourself. Now, what do you think could be the next step in making our lives even easier? As developers, we want to spend more time developing software and less time on headache-inducing configuration. Trends in the industry can, and should, be used to empower developers to increase their productivity. We've explored how containers and the cloud can take us to the next level, and you can [get started with the Dev Containers extension](https://code.visualstudio.com/docs/remote/containers) to see for yourself. Now, what do you think could be the next step in making our lives even easier?
Happy Coding! Happy Coding!

Просмотреть файл

@ -25,7 +25,7 @@ Containers have historically been used to standardize apps when they're deployed
![Diagram comparing dev versus production containers](dev-container-stages.png) ![Diagram comparing dev versus production containers](dev-container-stages.png)
Dev containers have been supported in Visual Studio Code since [the announcement](https://code.visualstudio.com/blogs/2019/05/02/remote-development) of the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in 2019, and more recently in [GitHub Codespaces](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers). This support is backed by **devcontainer.json**, a structured JSON with Comments (jsonc) metadata format to configure a containerized environment. Dev containers have been supported in Visual Studio Code since [the announcement](https://code.visualstudio.com/blogs/2019/05/02/remote-development) of the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in 2019, and more recently in [GitHub Codespaces](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers). This support is backed by **devcontainer.json**, a structured JSON with Comments (jsonc) metadata format to configure a containerized environment.
As containerizing production workloads becomes commonplace, dev containers have become broadly useful for scenarios beyond VS Code. We're excited to announce that work has started on the [Development Containers Specification](https://github.com/devcontainers/spec), which empowers anyone in any tool to configure a consistent dev environment. In addition, today we're excited to share a major component of this specification that you can now try, which is the **dev container CLI**. As containerizing production workloads becomes commonplace, dev containers have become broadly useful for scenarios beyond VS Code. We're excited to announce that work has started on the [Development Containers Specification](https://github.com/devcontainers/spec), which empowers anyone in any tool to configure a consistent dev environment. In addition, today we're excited to share a major component of this specification that you can now try, which is the **dev container CLI**.
@ -35,7 +35,7 @@ The dev container CLI is a reference implementation for the dev container specif
When tools like VS Code and Codespaces detect a `devcontainer.json` file in a user's project, they use a CLI to configure a dev container. We've now opened up this CLI as a reference implementation so that individual users and other tools can read in `devcontainer.json` metadata and create dev containers from it. When tools like VS Code and Codespaces detect a `devcontainer.json` file in a user's project, they use a CLI to configure a dev container. We've now opened up this CLI as a reference implementation so that individual users and other tools can read in `devcontainer.json` metadata and create dev containers from it.
This CLI can either be used directly or integrated into product experiences, similar to how it's integrated with Remote - Containers and Codespaces today. It currently supports both a simple single container option and integrates with [Docker Compose](https://docs.docker.com/compose/) for multi-container scenarios. This CLI can either be used directly or integrated into product experiences, similar to how it's integrated with Dev Containers and Codespaces today. It currently supports both a simple single container option and integrates with [Docker Compose](https://docs.docker.com/compose/) for multi-container scenarios.
The CLI is available for review in a new [devcontainers/cli](https://github.com/devcontainers/cli) repository and you can read more about its development in [this issue in the spec repo](https://github.com/devcontainers/spec/issues/9). The CLI is available for review in a new [devcontainers/cli](https://github.com/devcontainers/cli) repository and you can read more about its development in [this issue in the spec repo](https://github.com/devcontainers/spec/issues/9).
@ -115,7 +115,7 @@ This will compile and run the Rust sample, outputting:
Compiling hello_remote_world v0.1.0 (/workspaces/vscode-remote-try-rust) Compiling hello_remote_world v0.1.0 (/workspaces/vscode-remote-try-rust)
Finished dev [unoptimized + debuginfo] target(s) in 1.06s Finished dev [unoptimized + debuginfo] target(s) in 1.06s
Running `target/debug/hello_remote_world` Running `target/debug/hello_remote_world`
Hello, VS Code Remote - Containers! Hello, VS Code Dev Containers!
{"outcome":"success"} {"outcome":"success"}
``` ```

Просмотреть файл

@ -25,7 +25,7 @@ We're happy to share that dev container **Features** help you smoothly get the t
Features are self-contained units of installation code, container configuration, and/or settings and extensions designed to enable new development capabilities in your dev container. They can be built to work with a wide range of base container images. As part of our work on the [open dev container specification](https://containers.dev/), we've made some improvements to where you can grab pre-created Features and how you can author and distribute your own. Features are self-contained units of installation code, container configuration, and/or settings and extensions designed to enable new development capabilities in your dev container. They can be built to work with a wide range of base container images. As part of our work on the [open dev container specification](https://containers.dev/), we've made some improvements to where you can grab pre-created Features and how you can author and distribute your own.
Let's see what's new and how you can get started with Features from any dev container supporting tool or service (such as the [VS Code Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension or [GitHub Codespaces](https://github.com/features/codespaces))! Let's see what's new and how you can get started with Features from any dev container supporting tool or service (such as the [VS Code Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension or [GitHub Codespaces](https://github.com/features/codespaces))!
## Adding Features to your dev container ## Adding Features to your dev container
@ -51,7 +51,7 @@ The example below installs the [go](https://github.com/devcontainers/features/tr
} }
``` ```
You can also explore official and publicly contributed Features [on the specification site](https://containers.dev/features). Any Feature can be added by editing `devcontainer.json`, and publicly published ones can be added through existing dev container configuration experiences (such as available in the VS Code [Remote - Containers](https://code.visualstudio.com/docs/remote/containers#_dev-container-features-preview) extension). You can also explore official and publicly contributed Features [on the specification site](https://containers.dev/features). Any Feature can be added by editing `devcontainer.json`, and publicly published ones can be added through existing dev container configuration experiences (such as available in the VS Code [Dev Containers](https://code.visualstudio.com/docs/remote/containers#_dev-container-features-preview) extension).
![Specification site list of available Features](features-list-site.png) ![Specification site list of available Features](features-list-site.png)
@ -101,7 +101,7 @@ The [Features template](https://github.com/devcontainers/feature-template) repos
### Sharing your Features with the community ### Sharing your Features with the community
If you'd like your contributions to appear in the VS Code [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) or [GitHub Codespaces](https://github.com/features/codespaces) UI for dev container creation, you can do the following steps: If you'd like your contributions to appear in the VS Code [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) or [GitHub Codespaces](https://github.com/features/codespaces) UI for dev container creation, you can do the following steps:
* Go to [devcontainers.github.io](https://github.com/devcontainers/devcontainers.github.io) (the GitHub repo backing [containers.dev](https://containers.dev)) * Go to [devcontainers.github.io](https://github.com/devcontainers/devcontainers.github.io) (the GitHub repo backing [containers.dev](https://containers.dev))
* Open a PR to modify the [`collection-index.yml`](https://github.com/devcontainers/devcontainers.github.io/blob/gh-pages/_data/collection-index.yml) file * Open a PR to modify the [`collection-index.yml`](https://github.com/devcontainers/devcontainers.github.io/blob/gh-pages/_data/collection-index.yml) file

Просмотреть файл

@ -7,7 +7,7 @@ MetaDescription: Connect via SSH to Docker engine running on a remote machine an
--- ---
# Connect to remote Docker over SSH # Connect to remote Docker over SSH
We recommend using the Visual Studio Code [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension to connect to a remote machine running Docker engine. You can use the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extensions together. You may review the steps in the [remote development documentation](/docs/remote/containers.md#open-a-folder-on-a-remote-ssh-host-in-a-container). We recommend using the Visual Studio Code [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension to connect to a remote machine running Docker engine. You can use the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) and [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extensions together. You may review the steps in the [remote development documentation](/docs/remote/containers.md#open-a-folder-on-a-remote-ssh-host-in-a-container).
It is also possible to connect to the remote Docker engine directly using SSH tunneling, which you can read more about below. It is also possible to connect to the remote Docker engine directly using SSH tunneling, which you can read more about below.

Просмотреть файл

@ -13,7 +13,7 @@ In this tutorial, you will configure Visual Studio Code to use the GCC C++ compi
> **Note**: Much of this tutorial is applicable to working with C++ and VS Code directly on a Linux machine. > **Note**: Much of this tutorial is applicable to working with C++ and VS Code directly on a Linux machine.
Visual Studio Code has support for working directly in WSL with the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). We recommend this mode of [WSL development](/docs/remote/wsl.md), where all your source code files, in addition to the compiler, are hosted on the Linux distro. For more background, see [VS Code Remote Development](/docs/remote/remote-overview.md). Visual Studio Code has support for working directly in WSL with the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). We recommend this mode of [WSL development](/docs/remote/wsl.md), where all your source code files, in addition to the compiler, are hosted on the Linux distro. For more background, see [VS Code Remote Development](/docs/remote/remote-overview.md).
After completing this tutorial, you will be ready to create and configure your own C++ project, and to explore the VS Code documentation for further information about its many features. This tutorial does not teach you about GCC or Linux or the C++ language. For those subjects, there are many good resources available on the Web. After completing this tutorial, you will be ready to create and configure your own C++ project, and to explore the VS Code documentation for further information about its many features. This tutorial does not teach you about GCC or Linux or the C++ language. For those subjects, there are many good resources available on the Web.
@ -25,7 +25,7 @@ To successfully complete this tutorial, you must do the following steps:
1. Install [Visual Studio Code](/download). 1. Install [Visual Studio Code](/download).
1. Install the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). 1. Install the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl).
1. Install [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/install) and then use the links on that same page to install your Linux distribution of choice. This tutorial uses Ubuntu. During installation, remember your Linux user password because you'll need it to install additional software. 1. Install [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/install) and then use the links on that same page to install your Linux distribution of choice. This tutorial uses Ubuntu. During installation, remember your Linux user password because you'll need it to install additional software.

Просмотреть файл

@ -175,9 +175,9 @@ VS Code and the C++ extension support [Remote Development](/docs/remote/remote-o
To install support for Remote Development: To install support for Remote Development:
1. Install the VS Code [Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack). 1. Install the VS Code [Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack).
1. If the remote source files are hosted in WSL, use the **Remote - WSL** extension. 1. If the remote source files are hosted in WSL, use the **WSL** extension.
1. If you are connecting to a remote machine with SSH, use the **Remote - SSH** extension. 1. If you are connecting to a remote machine with SSH, use the **Remote - SSH** extension.
1. If the remote source files are hosted in a container (for example, Docker), use the **Remote - Containers** extension. 1. If the remote source files are hosted in a container (for example, Docker), use the **Dev Containers** extension.
## Feedback ## Feedback

Просмотреть файл

@ -23,7 +23,7 @@ Once you have a version of Python installed, activate it using the **Python: Sel
You can configure the Python extension through settings. Learn more in the [Python Settings reference](/docs/python/settings-reference.md). You can configure the Python extension through settings. Learn more in the [Python Settings reference](/docs/python/settings-reference.md).
>**Windows Subsystem for Linux**: If you are on Windows, WSL is a great way to do Python development. You can run Linux distributions on Windows and Python is often already installed. When coupled with the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL. To learn more, go to [Developing in WSL](/docs/remote/wsl.md) or try the [Working in WSL](/docs/remote/wsl-tutorial.md) tutorial. >**Windows Subsystem for Linux**: If you are on Windows, WSL is a great way to do Python development. You can run Linux distributions on Windows and Python is often already installed. When coupled with the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL. To learn more, go to [Developing in WSL](/docs/remote/wsl.md) or try the [Working in WSL](/docs/remote/wsl-tutorial.md) tutorial.
## Run Python code ## Run Python code

Просмотреть файл

@ -20,7 +20,7 @@ To test that you have Node.js installed correctly on your computer, open a new t
>**Linux**: There are specific Node.js packages available for the various flavors of Linux. See [Installing Node.js via package manager](https://nodejs.org/en/download/package-manager) to find the Node.js package and installation instructions tailored to your version of Linux. >**Linux**: There are specific Node.js packages available for the various flavors of Linux. See [Installing Node.js via package manager](https://nodejs.org/en/download/package-manager) to find the Node.js package and installation instructions tailored to your version of Linux.
>**Windows Subsystem for Linux**: If you are on Windows, WSL is a great way to do Node.js development. You can run Linux distributions on Windows and install Node.js into the Linux environment. When coupled with the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL. To learn more, go to [Developing in WSL](/docs/remote/wsl.md) or try the [Working in WSL](/docs/remote/wsl-tutorial.md) tutorial. >**Windows Subsystem for Linux**: If you are on Windows, WSL is a great way to do Node.js development. You can run Linux distributions on Windows and install Node.js into the Linux environment. When coupled with the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL. To learn more, go to [Developing in WSL](/docs/remote/wsl.md) or try the [Working in WSL](/docs/remote/wsl-tutorial.md) tutorial.
## Hello World ## Hello World

Просмотреть файл

@ -63,7 +63,7 @@ The built-in Python 3 installation on Linux works well, but to install other Pyt
- **Data Science**: If your primary purpose for using Python is Data Science, then you might consider a download from [Anaconda](https://www.anaconda.com/download/). Anaconda provides not just a Python interpreter, but many useful libraries and tools for data science. - **Data Science**: If your primary purpose for using Python is Data Science, then you might consider a download from [Anaconda](https://www.anaconda.com/download/). Anaconda provides not just a Python interpreter, but many useful libraries and tools for data science.
- **Windows Subsystem for Linux**: If you are working on Windows and want a Linux environment for working with Python, the [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/about) (WSL) is an option for you. If you choose this option, you'll also want to install the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). For more information about using WSL with VS Code, see [VS Code Remote Development](/docs/remote/remote-overview.md) or try the [Working in WSL tutorial](/docs/remote/wsl-tutorial.md), which will walk you through setting up WSL, installing Python, and creating a Hello World application running in WSL. - **Windows Subsystem for Linux**: If you are working on Windows and want a Linux environment for working with Python, the [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/about) (WSL) is an option for you. If you choose this option, you'll also want to install the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl). For more information about using WSL with VS Code, see [VS Code Remote Development](/docs/remote/remote-overview.md) or try the [Working in WSL tutorial](/docs/remote/wsl-tutorial.md), which will walk you through setting up WSL, installing Python, and creating a Hello World application running in WSL.
## Verify the Python installation ## Verify the Python installation

Просмотреть файл

@ -13,7 +13,7 @@ Visual Studio Code can create and start containers for you but that may not matc
## Attach to a Docker container ## Attach to a Docker container
To attach to a Docker container, either select **Remote-Containers: Attach to Running Container...** from the Command Palette (`kbstyle(F1)`) or use the **Remote Explorer** in the Activity Bar and from the **Containers** view, select the **Attach to Container** inline action on the container you want to connect to. To attach to a Docker container, either select **Dev Containers: Attach to Running Container...** from the Command Palette (`kbstyle(F1)`) or use the **Remote Explorer** in the Activity Bar and from the **Containers** view, select the **Attach to Container** inline action on the container you want to connect to.
![Containers Explorer screenshot](images/containers/containers-attach.png) ![Containers Explorer screenshot](images/containers/containers-attach.png)
@ -23,9 +23,9 @@ To attach to a Docker container, either select **Remote-Containers: Attach to Ru
VS Code supports image or container name-level configuration files to speed up setup when you repeatedly connect to a given Docker container. Once attached, anytime you open a folder, [install an extension](/docs/remote/containers.md#managing-extensions), or [forward a port](/docs/remote/containers.md#forwarding-or-publishing-a-port), a local image-specific configuration file will automatically be updated to remember your settings so that when you attach again, everything is back to the right place. VS Code supports image or container name-level configuration files to speed up setup when you repeatedly connect to a given Docker container. Once attached, anytime you open a folder, [install an extension](/docs/remote/containers.md#managing-extensions), or [forward a port](/docs/remote/containers.md#forwarding-or-publishing-a-port), a local image-specific configuration file will automatically be updated to remember your settings so that when you attach again, everything is back to the right place.
* By default, an **image-level** configuration is used. To view or update it after attaching, select **Remote-Containers: Open Container Configuration** from the Command Palette (`kbstyle(F1)`). * By default, an **image-level** configuration is used. To view or update it after attaching, select **Dev Containers: Open Container Configuration File** from the Command Palette (`kbstyle(F1)`).
* If you would prefer to tie your configuration to a **container name**, select **Remote-Containers: Open Named Configuration File** from the Command Palette (`kbstyle(F1)`) after attaching. Any updates from this point forward will apply to this name-level configuration rather than at the image level. * If you would prefer to tie your configuration to a **container name**, select **Dev Containers: Open Named Configuration File** from the Command Palette (`kbstyle(F1)`) after attaching. Any updates from this point forward will apply to this name-level configuration rather than at the image level.
Both of these files support a subset of `devcontainer.json` properties: Both of these files support a subset of `devcontainer.json` properties:
@ -59,7 +59,7 @@ See the [attached container config reference](#attached-container-configuration-
Once saved, whenever you open a container for the first time with the same image / container name, these properties will be used to configure the environment. Once saved, whenever you open a container for the first time with the same image / container name, these properties will be used to configure the environment.
> **Tip:** If something is wrong with your configuration, you can also edit it when not attached to the container by selecting **Remote-Containers: Open Attached Container Configuration File...** from the Command Palette (`kbstyle(F1)`) and then picking the image / container name from the presented list. > **Tip:** If something is wrong with your configuration, you can also edit it when not attached to the container by selecting **Dev Containers: Open Attached Container Configuration File...** from the Command Palette (`kbstyle(F1)`) and then picking the image / container name from the presented list.
Finally, if you have extensions you want installed regardless of the container you attach to, you can update `settings.json` to specify a list of [extensions that should always be installed](/docs/remote/containers.md#always-installed-extensions). Finally, if you have extensions you want installed regardless of the container you attach to, you can update `settings.json` to specify a list of [extensions that should always be installed](/docs/remote/containers.md#always-installed-extensions).
@ -90,7 +90,7 @@ Variables can be referenced in certain string values in attached configuration f
## Attach to a container in a Kubernetes cluster ## Attach to a container in a Kubernetes cluster
To attach to a container in a Kubernetes cluster, first install the [Kubernetes extension](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools) and `kubectl` along with the Remote - Containers extension. Then select the Kubernetes explorer from the Activity bar and expand the cluster and Pod where the container you want to attach to resides. Finally, right-click on the container and select **Attach Visual Studio Code** from context menu. To attach to a container in a Kubernetes cluster, first install the [Kubernetes extension](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools) and `kubectl` along with the Dev Containers extension. Then select the Kubernetes explorer from the Activity bar and expand the cluster and Pod where the container you want to attach to resides. Finally, right-click on the container and select **Attach Visual Studio Code** from context menu.
> **Note:** Attached container configuration files are not yet supported for containers in a Kubernetes cluster. > **Note:** Attached container configuration files are not yet supported for containers in a Kubernetes cluster.

Просмотреть файл

@ -19,7 +19,7 @@ An environment is the "backend" half of GitHub Codespaces. It's where all of the
## Customization ## Customization
GitHub Codespaces are fully customizable on a per project basis. This is accomplished by including a `devcontainer.json` file in the project's repository, similar to VS Code [Remote Container](/docs/remote/containers.md) development. GitHub Codespaces are fully customizable on a per project basis. This is accomplished by including a `devcontainer.json` file in the project's repository, similar to VS Code [Dev Containers](/docs/remote/containers.md) development.
Example customizations include: Example customizations include:
@ -97,7 +97,7 @@ For several issues (especially keybindings or those listed with a workaround for
| [Flutter](https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter) (and Flutter development overall) | Several aspects of the Flutter workflow are limited due to the nature of Docker containers and Codespaces.<ul><li>Flutter recommends installation from snap, but snap cannot be installed within the Codespaces container.</li><li>Android Emulation does not work within a container.</li><li>Codespaces cannot detect USB devices plugged into your machine, which makes development on a physical device impossible.</li><li>Codespaces, like other Linux environments, doesn't support iOS development.</li></ul> | You can use local VS Code for Flutter development. | | [Flutter](https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter) (and Flutter development overall) | Several aspects of the Flutter workflow are limited due to the nature of Docker containers and Codespaces.<ul><li>Flutter recommends installation from snap, but snap cannot be installed within the Codespaces container.</li><li>Android Emulation does not work within a container.</li><li>Codespaces cannot detect USB devices plugged into your machine, which makes development on a physical device impossible.</li><li>Codespaces, like other Linux environments, doesn't support iOS development.</li></ul> | You can use local VS Code for Flutter development. |
| [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) | The extension provides three kinds of features to help with LaTeX authoring: 1) a set of views that surface common commands, 2) a PDF previewer, and 3) language features like snippets and IntelliSense. The extension can be used fairly fully featured, but there are some web or security limitations. | The following workarounds address limitations in the view and previewer feature areas: <ul><li>The views themselves work without issue, but a few of the commands try to launch native applications, like revealing the output folder in the OS file explorer. These do nothing in the web, so using the desktop is an alternative.</li><li>`"latex-workshop.view.pdf.viewer"` - This setting provides a PDF previewer similar to the [Markdown preview](/docs/languages/markdown.md#markdown-preview). You can preview in a browser tab, in a separate PDF viewer, or in a VS Code tab.<br>Only the browser tab is usable in web-based Codespaces. The separate PDF viewer fails silently, and the VS Code tab hits the [Content Security Policy](/api/extension-guides/webview.md#content-security-policy) issue. The VS Code Tab viewer has other features that aren't available due to this limitation.</li></ul> | | [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) | The extension provides three kinds of features to help with LaTeX authoring: 1) a set of views that surface common commands, 2) a PDF previewer, and 3) language features like snippets and IntelliSense. The extension can be used fairly fully featured, but there are some web or security limitations. | The following workarounds address limitations in the view and previewer feature areas: <ul><li>The views themselves work without issue, but a few of the commands try to launch native applications, like revealing the output folder in the OS file explorer. These do nothing in the web, so using the desktop is an alternative.</li><li>`"latex-workshop.view.pdf.viewer"` - This setting provides a PDF previewer similar to the [Markdown preview](/docs/languages/markdown.md#markdown-preview). You can preview in a browser tab, in a separate PDF viewer, or in a VS Code tab.<br>Only the browser tab is usable in web-based Codespaces. The separate PDF viewer fails silently, and the VS Code tab hits the [Content Security Policy](/api/extension-guides/webview.md#content-security-policy) issue. The VS Code Tab viewer has other features that aren't available due to this limitation.</li></ul> |
| [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) | Some Git Graph webview functionality may be limited in Codespaces. For instance, switching between a file from a commit and the Git Graph webview may blank out the webview. | You can use Git Graph fully within VS Code desktop. | | [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) | Some Git Graph webview functionality may be limited in Codespaces. For instance, switching between a file from a commit and the Git Graph webview may blank out the webview. | You can use Git Graph fully within VS Code desktop. |
| Other [Remote Development extensions](/docs/remote/remote-overview) (Remote - WSL, Remote - Containers, Remote - SSH) cannot be installed in a Codespace. | The Codespace is already a remote context. | If you'd like to run in another remote context (for example WSL or a remote SSH computer), open VS Code desktop (not connected to a Codespace) and launch one of the other remote extensions. If you'd like to use a [custom dev container](/docs/remote/create-dev-container.md), you can use the same `.devcontainer` in both Codespaces and Remote - Containers. | | Other [Remote Development extensions](/docs/remote/remote-overview) (WSL, Dev Containers, Remote - SSH) cannot be installed in a Codespace. | The Codespace is already a remote context. | If you'd like to run in another remote context (for example WSL or a remote SSH computer), open VS Code desktop (not connected to a Codespace) and launch one of the other remote extensions. If you'd like to use a [custom dev container](/docs/remote/create-dev-container.md), you can use the same `.devcontainer` in both Codespaces and Dev Containers. |
| **My_Favorite_Extension** doesn't work and isn't listed above. | There are a few other issues that can prevent features from working as expected in remote contexts. | In some cases, you can use another command to work around the issue, but in others, the extension may need to be modified. Check out the [remote extension tips](/docs/remote/troubleshooting.md#extension-tips) for common remote issues and tips on resolving them. | | **My_Favorite_Extension** doesn't work and isn't listed above. | There are a few other issues that can prevent features from working as expected in remote contexts. | In some cases, you can use another command to work around the issue, but in others, the extension may need to be modified. Check out the [remote extension tips](/docs/remote/troubleshooting.md#extension-tips) for common remote issues and tips on resolving them. |
## Common questions ## Common questions

Просмотреть файл

@ -4,7 +4,7 @@ Area: remote
TOCTitle: Advanced Containers TOCTitle: Advanced Containers
PageTitle: Advanced Container Configuration PageTitle: Advanced Container Configuration
ContentId: f180ac25-1d59-47ec-bad2-3ccbf214bbd8 ContentId: f180ac25-1d59-47ec-bad2-3ccbf214bbd8
MetaDescription: Advanced setup for using the VS Code Remote - Containers extension MetaDescription: Advanced setup for using the VS Code Dev Containers extension
DateApproved: 9/1/2022 DateApproved: 9/1/2022
--- ---
# Advanced Container Configuration # Advanced Container Configuration

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 9/1/2022
--- ---
# Remote development in Containers # Remote development in Containers
This tutorial walks you through running Visual Studio Code in a [Docker](https://www.docker.com/) container using the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. You need no prior knowledge of Docker to complete this tutorial. This tutorial walks you through running Visual Studio Code in a [Docker](https://www.docker.com/) container using the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. You need no prior knowledge of Docker to complete this tutorial.
Running VS Code **inside** a Docker container can be useful for many reasons, but in this walkthrough we'll focus on using a Docker container to set up a development environment that is isolated from your local environment. Running VS Code **inside** a Docker container can be useful for many reasons, but in this walkthrough we'll focus on using a Docker container to set up a development environment that is isolated from your local environment.
@ -44,31 +44,31 @@ docker --version
## Install the extension ## Install the extension
The Remote - Containers extension lets you run Visual Studio Code inside a Docker container. The Dev Containers extension lets you run Visual Studio Code inside a Docker container.
> <a class="install-extension-btn" href="vscode:extension/ms-vscode-remote.remote-containers">Install the Remote - Containers extension</a> > <a class="install-extension-btn" href="vscode:extension/ms-vscode-remote.remote-containers">Install the Dev Containers extension</a>
![Remote - Containers extension](images/containers-tutorial/containers-extension.png) ![Dev Containers extension](images/containers-tutorial/dev-containers-extension.png)
### Check installation ### Check installation
With the Remote - Containers extension installed, you will see a new Status bar item at the far left. With the Dev Containers extension installed, you will see a new Status bar item at the far left.
![Remote Status bar item](images/containers-tutorial/remote-status-bar.png) ![Remote Status bar item](images/containers-tutorial/remote-status-bar.png)
The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Remote - Containers commands. The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Dev Containers commands.
![Remote - Containers commands](images/containers-tutorial/remote-containers-commands.png) ![Dev Containers commands](images/containers-tutorial/dev-containers-commands.png)
## Get the sample ## Get the sample
To create a Docker container, we are going to open a GitHub repository with a Node.js project. To create a Docker container, we are going to open a GitHub repository with a Node.js project.
Select **Remote-Containers: Try a Development Container Sample...** from the command list that appears and select the Node sample from the list. Select **Dev Containers: Try a Dev Container Sample...** from the command list that appears and select the Node sample from the list.
![Select a sample from the list](images/containers/select-a-sample.png) ![Select a sample from the list](images/containers/select-a-sample.png)
**Note**: There are other remote container samples such as `vscode-remote-try-python` or `vscode-remote-try-java`, but this tutorial will use `vscode-remote-try-node`. **Note**: There are other dev container samples such as `vscode-remote-try-python` or `vscode-remote-try-java`, but this tutorial will use `vscode-remote-try-node`.
### Wait for the container to build ### Wait for the container to build
@ -110,9 +110,9 @@ You can end your session in the container and go back to running VS Code locally
## How it works ## How it works
This next section describes in more detail how the Remote - Containers extension sets up and configures your containers. This next section describes in more detail how the Dev Containers extension sets up and configures your containers.
The remote container extension uses the files in the `.devcontainer` folder, namely `devcontainer.json`, and an optional `Dockerfile` or `docker-compose.yml`, to create your dev containers. The Dev Containers extension uses the files in the `.devcontainer` folder, namely `devcontainer.json`, and an optional `Dockerfile` or `docker-compose.yml`, to create your dev containers.
First your image is built from the supplied Docker file or image name. Then a container is created and started using some of the settings in the `devcontainer.json`. Finally your Visual Studio Code environment is installed and configured again according to settings in the `devcontainer.json`. First your image is built from the supplied Docker file or image name. Then a container is created and started using some of the settings in the `devcontainer.json`. Finally your Visual Studio Code environment is installed and configured again according to settings in the `devcontainer.json`.
@ -171,7 +171,7 @@ This has been a brief overview of what is possible using dev containers. As a ne
Check out the other Remote Development extensions. Check out the other Remote Development extensions.
* [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) * [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh)
* [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) * [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
Or get them all by installing the Or get them all by installing the
[Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack. [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack.
@ -180,7 +180,7 @@ Or get them all by installing the
### Verify Docker context ### Verify Docker context
If you are not using a fresh Docker install and the **Remote-Containers: Try a Development Container Sample...** sample encounters issues with the current context, you should check your Docker context. Fresh installs will have a 'default' context and you can set it back as the current context. If you are not using a fresh Docker install and the **Dev Containers: Try a Dev Container Sample...** sample encounters issues with the current context, you should check your Docker context. Fresh installs will have a 'default' context and you can set it back as the current context.
```bash ```bash
# Displays the list of contexts, '*' denotes the current context # Displays the list of contexts, '*' denotes the current context

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 9/1/2022
--- ---
# Developing inside a Container # Developing inside a Container
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 Visual Studio Code's full feature set. A [devcontainer.json file](#create-a-devcontainerjson-file) in your project tells VS Code how to access (or create) a **development container** with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase. The **Visual Studio Code Dev 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 Visual Studio Code's full feature set. A [devcontainer.json file](#create-a-devcontainerjson-file) in your project tells VS Code how to access (or create) a **development container** with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase.
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 just by connecting to a different container. 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 just by connecting to a different container.
@ -74,14 +74,14 @@ Here are two tips to consider:
### Working with Containers ### Working with Containers
The Remote - Containers extension supports two primary operating models: The Dev Containers extension supports two primary operating models:
* You can use a container as your [full-time development environment](/docs/remote/create-dev-container.md#create-a-devcontainerjson-file). * You can use a container as your [full-time development environment](/docs/remote/create-dev-container.md#create-a-devcontainerjson-file).
* You can [attach to a running container](/docs/remote/attach-container.md) to inspect it. * You can [attach to a running container](/docs/remote/attach-container.md) to inspect it.
## Quick start: Try a development container ## Quick start: Try a development container
The easiest way to get started is to try one of the sample development containers. The [Containers tutorial](/docs/remote/containers-tutorial.md) will walk you through setting up Docker and the Remote - Containers extension and let you select a sample: The easiest way to get started is to try one of the sample development containers. The [Containers tutorial](/docs/remote/containers-tutorial.md) will walk you through setting up Docker and the Dev Containers extension and let you select a sample:
![Select a sample from the list](images/containers/select-a-sample.png) ![Select a sample from the list](images/containers/select-a-sample.png)
@ -91,9 +91,9 @@ The easiest way to get started is to try one of the sample development container
This quick start covers how to set up a dev container for an existing project to use as your full-time development environment using existing source code on your filesystem. Follow these steps: This quick start covers how to set up a dev container for an existing project to use as your full-time development environment using existing source code on your filesystem. Follow these steps:
1. Start VS Code, run the **Remote-Containers: Open Folder in Container...** command from the Command Palette (`kbstyle(F1)`) or quick actions Status bar item, and select the project folder you would like to set up the container for. 1. Start VS Code, run the **Dev Containers: Open Folder in Container...** command from the Command Palette (`kbstyle(F1)`) or quick actions Status bar item, and select the project folder you would like to set up the container for.
> **Tip:** If you want to edit the container's contents or settings before opening the folder, you can run **Remote-Containers: Add Development Container Configuration Files...** instead. > **Tip:** If you want to edit the container's contents or settings before opening the folder, you can run **Dev Containers: Add Dev Container Configuration Files...** instead.
![Quick actions Status bar item](images/common/remote-dev-status-bar.png) ![Quick actions Status bar item](images/common/remote-dev-status-bar.png)
@ -129,14 +129,14 @@ If you are using [Windows Subsystem for Linux v2 (WSL 2)](https://learn.microsof
Once the WSL 2 engine is enabled, you can either: Once the WSL 2 engine is enabled, you can either:
* Use the **Remote-Containers: Reopen Folder in Container** command from a folder already opened using the [Remote - WSL](https://aka.ms/vscode-remote/download/wsl) extension. * Use the **Dev Containers: Reopen in Container** command from a folder already opened using the [WSL](https://aka.ms/vscode-remote/download/wsl) extension.
* Select **Remote-Containers: Open Folder in Container...** from the Command Palette (`kbstyle(F1)`) and choose a WSL folder using the local `\\wsl$` share (from the Windows side). * Select **Dev Containers: Open Folder in Container...** from the Command Palette (`kbstyle(F1)`) and choose a WSL folder using the local `\\wsl$` share (from the Windows side).
The rest of the quick start applies as-is! You can learn more about the [Remote - WSL extension in its documentation](/docs/remote/wsl.md). The rest of the quick start applies as-is! You can learn more about the [WSL extension in its documentation](/docs/remote/wsl.md).
### Open a folder on a remote SSH host in a container ### Open a folder on a remote SSH host in a container
If you are using a Linux or macOS SSH host, you can use the [Remote - SSH](/docs/remote/ssh.md) and Remote - Containers extensions together. You do not even need to have a Docker client installed locally. If you are using a Linux or macOS SSH host, you can use the [Remote - SSH](/docs/remote/ssh.md) and Dev Containers extensions together. You do not even need to have a Docker client installed locally.
To do so: To do so:
@ -144,9 +144,9 @@ To do so:
1. **Optional:** Set up SSH [key based authentication](/docs/remote/troubleshooting.md#configuring-key-based-authentication) to the server so you do not need to enter your password multiple times. 1. **Optional:** Set up SSH [key based authentication](/docs/remote/troubleshooting.md#configuring-key-based-authentication) to the server so you do not need to enter your password multiple times.
1. [Install Docker](#installation) on your SSH host. You do not need to install Docker locally. 1. [Install Docker](#installation) on your SSH host. You do not need to install Docker locally.
1. Follow the [quick start](/docs/remote/ssh.md#connect-to-a-remote-host) for the Remote - SSH extension to connect to a host and open a folder there. 1. Follow the [quick start](/docs/remote/ssh.md#connect-to-a-remote-host) for the Remote - SSH extension to connect to a host and open a folder there.
1. Use the **Remote-Containers: Reopen in Container** command from the Command Palette (`kbstyle(F1)`, `kb(workbench.action.showCommands)`). 1. Use the **Dev Containers: Reopen in Container** command from the Command Palette (`kbstyle(F1)`, `kb(workbench.action.showCommands)`).
The rest of the Remote - Containers quick start applies as-is. You can learn more about the [Remote - SSH extension in its documentation](/docs/remote/ssh.md). You can also see the [Develop on a remote Docker host](/remote/advancedcontainers/develop-remote-host.md) article for other options if this model does not meet your needs. The rest of the Dev Containers quick start applies as-is. You can learn more about the [Remote - SSH extension in its documentation](/docs/remote/ssh.md). You can also see the [Develop on a remote Docker host](/remote/advancedcontainers/develop-remote-host.md) article for other options if this model does not meet your needs.
### Open an existing workspace in a container ### Open an existing workspace in a container
@ -154,7 +154,7 @@ You can also follow a similar process to open a [VS Code multi-root workspace](/
You can either: You can either:
* Use the **Remote-Containers: Open Workspace in Container...** command. * Use the **Dev Containers: Open Workspace in Container...** command.
* Use **File > Open Workspace...** once you have opened a folder that contains a `.code-workspace` file in a container. * Use **File > Open Workspace...** once you have opened a folder that contains a `.code-workspace` file in a container.
Once connected, you may want to **add the `.devcontainer` folder** to the workspace so you can easily edit its contents if it is not already visible. Once connected, you may want to **add the `.devcontainer` folder** to the workspace so you can easily edit its contents if it is not already visible.
@ -169,7 +169,7 @@ Repository Containers use isolated, local Docker volumes instead of binding to t
For example, follow these steps to open one of the "try" repositories in a Repository Container: For example, follow these steps to open one of the "try" repositories in a Repository Container:
1. Start VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (`kbstyle(F1)`). 1. Start VS Code and run **Dev Containers: Clone Repository in Container Volume...** from the Command Palette (`kbstyle(F1)`).
2. Enter `microsoft/vscode-remote-try-node` (or one of the other "try" repositories), a Git URI, a GitHub branch URL, or a GitHub PR URL in the input box that appears and press `kbstyle(Enter)`. 2. Enter `microsoft/vscode-remote-try-node` (or one of the other "try" repositories), a Git URI, a GitHub branch URL, or a GitHub PR URL in the input box that appears and press `kbstyle(Enter)`.
@ -203,7 +203,7 @@ Note that if the container fails to come up due to something like a Docker build
Visual Studio Code takes security seriously and wants to help you safely browse and edit code no matter the source or original authors. The [Workspace Trust feature](/docs/editor/workspace-trust.md) lets you decide whether your project folders should allow or restrict automatic code execution. Visual Studio Code takes security seriously and wants to help you safely browse and edit code no matter the source or original authors. The [Workspace Trust feature](/docs/editor/workspace-trust.md) lets you decide whether your project folders should allow or restrict automatic code execution.
The Remote - Containers extension has adopted Workspace Trust. Depending on how you open and interact with your source code, you'll be prompted to decide if you trust the code you're editing or executing at different points. The Dev Containers extension has adopted Workspace Trust. Depending on how you open and interact with your source code, you'll be prompted to decide if you trust the code you're editing or executing at different points.
### Reopen folder in container ### Reopen folder in container
@ -256,7 +256,7 @@ You can use any image, Dockerfile, or set of Docker Compose files as a starting
} }
``` ```
Selecting the **Remote-Containers: Add Development Container Configuration Files...** command from the Command Palette (`kbstyle(F1)`) will add the needed files to your project as a starting point, which you can further customize for your needs. The command lets you pick a pre-defined container configuration from a list based on your folder's contents, reuse an existing Dockerfile, or reuse an existing Docker Compose file. Selecting the **Dev Containers: Add Dev Container Configuration Files...** command from the Command Palette (`kbstyle(F1)`) will add the needed files to your project as a starting point, which you can further customize for your needs. The command lets you pick a pre-defined container configuration from a list based on your folder's contents, reuse an existing Dockerfile, or reuse an existing Docker Compose file.
To learn more about creating `devcontainer.json` files, see [Create a Development Container](/docs/remote/create-dev-container.md). To learn more about creating `devcontainer.json` files, see [Create a Development Container](/docs/remote/create-dev-container.md).
@ -264,7 +264,7 @@ To learn more about creating `devcontainer.json` files, see [Create a Developmen
Development container "Features" are self-contained, shareable units of installation code and dev container configuration. The name comes from the idea that referencing one of them allows you to quickly and easily add more tooling, runtime, or library "Features" into your development container for use by you or your collaborators. Development container "Features" are self-contained, shareable units of installation code and dev container configuration. The name comes from the idea that referencing one of them allows you to quickly and easily add more tooling, runtime, or library "Features" into your development container for use by you or your collaborators.
When you use **Remote-Containers: Add Development Container Configuration Files**, you're presented a list of scripts to customize the existing dev container configurations, such as installing Git or the Azure CLI: When you use **Dev Containers: Add Dev Container Configuration Files**, you're presented a list of scripts to customize the existing dev container configurations, such as installing Git or the Azure CLI:
![Dev container Features list drop down](images/containers/container-features.png) ![Dev container Features list drop down](images/containers/container-features.png)
@ -282,7 +282,7 @@ You'll get IntelliSense when editing the `"features"` property in the `devcontai
![Intellisense when modifying terraform Feature](images/containers/features-intellisense.png) ![Intellisense when modifying terraform Feature](images/containers/features-intellisense.png)
The **Remote-Containers: Configure Container Features** command allows you to update an existing configuration. The **Dev Containers: Configure Container Features** command allows you to update an existing configuration.
The Features sourced in VS Code UI come from the [devcontainers/features repository](https://github.com/devcontainers/features). The Features sourced in VS Code UI come from the [devcontainers/features repository](https://github.com/devcontainers/features).
@ -315,7 +315,7 @@ See the [devcontainer CLI article on pre-building images](/docs/remote/devcontai
## Inspecting volumes ## Inspecting volumes
Occasionally you may run into a situation where you are using a Docker named volume that you want to inspect or make changes in. You can use VS Code to work with these contents without creating or modifying `devcontainer.json` file by selecting the **Remote-Containers: Explore a Volume in a Development Container...** from the Command Palette (`kbstyle(F1)`). Occasionally you may run into a situation where you are using a Docker named volume that you want to inspect or make changes in. You can use VS Code to work with these contents without creating or modifying `devcontainer.json` file by selecting the **Dev Containers: Explore a Volume in a Dev Container...** from the Command Palette (`kbstyle(F1)`).
You can also inspect your volumes in the Remote Explorer. Make sure you have Containers selected in the dropdown, then you'll notice a **Dev Volumes** section. You can right-click on a volume to inspect its creation information, like when the volume was created, what repo was cloned into it, and the mountpoint. You can also explore it in a dev container. You can also inspect your volumes in the Remote Explorer. Make sure you have Containers selected in the dropdown, then you'll notice a **Dev Volumes** section. You can right-click on a volume to inspect its creation information, like when the volume was created, what repo was cloned into it, and the mountpoint. You can also explore it in a dev container.
@ -427,7 +427,7 @@ To publish a port, you can:
- "8921:5000" - "8921:5000"
``` ```
In each case, you'll need to rebuild your container for the setting to take effect. You can do this by running the **Remote-Containers: Rebuild Container** command in the Command Palette (`kbstyle(F1)`) when you are connected to the container. In each case, you'll need to rebuild your container for the setting to take effect. You can do this by running the **Dev Containers: Rebuild Container** command in the Command Palette (`kbstyle(F1)`) when you are connected to the container.
## Opening a terminal ## Opening a terminal
@ -471,7 +471,7 @@ Since this just establishes the default, you are still able to change the settin
## Sharing Git credentials with your container ## Sharing Git credentials with your container
The Remote - Containers extension provides out of box support for using local Git credentials from inside a container. In this section, we'll walk through the two supported options. The Dev Containers extension provides out of box support for using local Git credentials from inside a container. In this section, we'll walk through the two supported options.
If you do not have your user name or email address set up locally, you may be prompted to do so. You can do this on your **local** machine by running the following commands: If you do not have your user name or email address set up locally, you may be prompted to do so. You can do this on your **local** machine by running the following commands:
@ -562,11 +562,11 @@ RUN sudo apt-get update && sudo apt-get install gnupg2 -y
The next time the container starts, your GPG keys should be accessible inside the container as well. The next time the container starts, your GPG keys should be accessible inside the container as well.
> **Note:** If you used `gpg` previously in the container, you may need to run **Remote-Containers: Rebuild Container** for the update to take effect. > **Note:** If you used `gpg` previously in the container, you may need to run **Dev Containers: Rebuild Container** for the update to take effect.
## Managing containers ## Managing containers
By default, the Remote - Containers extension automatically starts the containers mentioned in the `devcontainer.json` when you open the folder. When you close VS Code, the extension automatically shuts down the containers you've connected to. You can change this behavior by adding `"shutdownAction": "none"` to `devcontainer.json`. By default, the Dev Containers extension automatically starts the containers mentioned in the `devcontainer.json` when you open the folder. When you close VS Code, the extension automatically shuts down the containers you've connected to. You can change this behavior by adding `"shutdownAction": "none"` to `devcontainer.json`.
While you can use the command line to manage your containers, you can also use the **Remote Explorer**. To stop a container, select Containers from the dropdown (if present), right-click on a running container, and select **Stop Container**. You can also start exited containers, remove containers, and remove recent folders. From the Details view, you can forward ports and open already forwarded ports in the browser. While you can use the command line to manage your containers, you can also use the **Remote Explorer**. To stop a container, select Containers from the dropdown (if present), right-click on a running container, and select **Stop Container**. You can also start exited containers, remove containers, and remove recent folders. From the Details view, you can forward ports and open already forwarded ports in the browser.
@ -578,7 +578,7 @@ If you want to clean out images or mass-delete containers, see [Cleaning out unu
Dotfiles are files whose filename begins with a dot (`.`) and typically contain configuration information for various applications. Since development containers can cover a wide range of application types, it can be useful to store these files somewhere so that you can easily copy them into a container once it is up and running. Dotfiles are files whose filename begins with a dot (`.`) and typically contain configuration information for various applications. Since development containers can cover a wide range of application types, it can be useful to store these files somewhere so that you can easily copy them into a container once it is up and running.
A common way to do this is to store these dotfiles in a GitHub repository and then use a utility to clone and apply them. The Remote - Containers extension has built-in support for using these with your own containers. If you are new to the idea, take a look at the different [dotfiles bootstrap repositories](https://dotfiles.github.io/) that exist. A common way to do this is to store these dotfiles in a GitHub repository and then use a utility to clone and apply them. The Dev Containers extension has built-in support for using these with your own containers. If you are new to the idea, take a look at the different [dotfiles bootstrap repositories](https://dotfiles.github.io/) that exist.
To use it, add your dotfiles GitHub repository to VS Code's User Settings (`kb(workbench.action.openSettings)`) as follows: To use it, add your dotfiles GitHub repository to VS Code's User Settings (`kb(workbench.action.openSettings)`) as follows:
@ -618,7 +618,7 @@ There is a full [devcontainer.json reference](https://containers.dev/implementor
## Known limitations ## Known limitations
### Remote - Containers limitations ### Dev Containers limitations
* Windows container images are **not** yet supported. * Windows container images are **not** yet supported.
* All roots/folders in a multi-root workspace will be opened in the same container, regardless of whether there are configuration files at lower levels. * All roots/folders in a multi-root workspace will be opened in the same container, regardless of whether there are configuration files at lower levels.
@ -626,7 +626,7 @@ There is a full [devcontainer.json reference](https://containers.dev/implementor
* Docker Toolbox on Windows is not supported. * Docker Toolbox on Windows is not supported.
* If you clone a Git repository using SSH and your SSH key has a passphrase, VS Code's pull and sync features may hang when running remotely. Either use an SSH key without a passphrase, clone using HTTPS, or run `git push` from the command line to work around the issue. * If you clone a Git repository using SSH and your SSH key has a passphrase, VS Code's pull and sync features may hang when running remotely. Either use an SSH key without a passphrase, clone using HTTPS, or run `git push` from the command line to work around the issue.
* Local proxy settings are not reused inside the container, which can prevent extensions from working unless the appropriate proxy information is configured (for example global `HTTP_PROXY` or `HTTPS_PROXY` environment variables with the appropriate proxy information). * Local proxy settings are not reused inside the container, which can prevent extensions from working unless the appropriate proxy information is configured (for example global `HTTP_PROXY` or `HTTPS_PROXY` environment variables with the appropriate proxy information).
* You cannot use Remote - Containers from a Remote - SSH connection to a Windows machine. * You cannot use Dev Containers from a Remote - SSH connection to a Windows machine.
See [here for a list of active issues](https://aka.ms/vscode-remote/containers/issues) related to Containers. See [here for a list of active issues](https://aka.ms/vscode-remote/containers/issues) related to Containers.
@ -640,7 +640,7 @@ See the Docker troubleshooting guide for [Windows](https://docs.docker.com/docke
### Docker Extension limitations ### Docker Extension limitations
If you are using the Docker or Kubernetes extension from a Remote - WSL or Remote - SSH window, you will not be able to use the right-click **Attach to Container** option. This will only work if you are using it from your local machine. If you are using the Docker or Kubernetes extension from a WSL or Remote - SSH window, you will not be able to use the right-click **Attach to Container** option. This will only work if you are using it from your local machine.
### Extension limitations ### Extension limitations
@ -680,7 +680,7 @@ Installation of VS Code Server requires that your local machine have outbound HT
* `vscode.blob.core.windows.net` * `vscode.blob.core.windows.net`
* `*.vo.msecnd.net` (Azure CDN) * `*.vo.msecnd.net` (Azure CDN)
The Remote - Containers extensions will download VS Code Server locally and copy it to the container once connected. The Dev Containers extensions will download VS Code Server locally and copy it to the container once connected.
You can install extensions manually without an internet connection using the **Extensions: Install from VSIX...** command, but if you use the extension panel or `devcontainer.json` to install extensions, your local machine and VS Code Server will need outbound HTTPS (port 443) access to: You can install extensions manually without an internet connection using the **Extensions: Install from VSIX...** command, but if you use the extension panel or `devcontainer.json` to install extensions, your local machine and VS Code Server will need outbound HTTPS (port 443) access to:

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 9/1/2022
--- ---
# Create a development container # Create a development container
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 or repository inside a container and take advantage of Visual Studio Code's full feature set. A `devcontainer.json` file in your project tells VS Code how to access (or create) a **development container** with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase. The **Visual Studio Code Dev Containers** extension lets you use a [Docker container](https://docker.com) as a full-featured development environment. It allows you to open any folder or repository inside a container and take advantage of Visual Studio Code's full feature set. A `devcontainer.json` file in your project tells VS Code how to access (or create) a **development container** with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase.
## Path to creating a dev container ## Path to creating a dev container
@ -22,7 +22,7 @@ In this document, we'll go through the steps for creating a development (dev) co
After any of the steps above, you'll have a fully functioning dev container, and you can either continue to the next step of this tutorial to add more features, or stop and begin working in the dev environment you currently have. After any of the steps above, you'll have a fully functioning dev container, and you can either continue to the next step of this tutorial to add more features, or stop and begin working in the dev environment you currently have.
> Note: The Remote - Containers extension has a **Remote-Containers: Add Development Container Configuration Files...** command that lets you pick a pre-defined container configuration from a list. If you'd prefer to have a complete dev container immediately rather than building up the `devcontainer.json` and Dockerfile step-by-step, you can skip ahead to [Automate dev container creation](#automate-dev-container-creation). > Note: The Dev Containers extension has a **Dev Containers: Add Dev Container Configuration Files...** command that lets you pick a pre-defined container configuration from a list. If you'd prefer to have a complete dev container immediately rather than building up the `devcontainer.json` and Dockerfile step-by-step, you can skip ahead to [Automate dev container creation](#automate-dev-container-creation).
## Create a devcontainer.json file ## Create a devcontainer.json file
@ -62,9 +62,9 @@ For this example, if you'd like to install the [ESLint extension](https://market
} }
``` ```
With the above `devcontainer.json`, your dev container is functional, and you can connect to and start developing within it. Try it out with the **Remote-Containers: Reopen in Container** command: With the above `devcontainer.json`, your dev container is functional, and you can connect to and start developing within it. Try it out with the **Dev Containers: Reopen in Container** command:
![Quick pick with list of Remote-Containers commands](images/containers/remote-containers-reopen.png) ![Quick pick with list of Dev Containers commands](images/containers/dev-containers-reopen.png)
After running this command, when VS Code restarts, you're now within a Node.js and TypeScript dev container with port 3000 forwarded and the ESLint extension installed. Once you're connected, notice the green remote indicator on the left of the Status bar to show you are connected to your dev container: After running this command, when VS Code restarts, you're now within a Node.js and TypeScript dev container with port 3000 forwarded and the ESLint extension installed. Once you're connected, notice the green remote indicator on the left of the Status bar to show you are connected to your dev container:
@ -131,7 +131,7 @@ See the article on [dev container features](/docs/remote/containers.md#dev-conta
### Rebuild ### Rebuild
When editing the contents of the `.devcontainer` folder, you'll need to rebuild for changes to take effect. Use the **Remote-Containers: Rebuild Container** command for your container to update. When editing the contents of the `.devcontainer` folder, you'll need to rebuild for changes to take effect. Use the **Dev Containers: Rebuild Container** command for your container to update.
However, if you **rebuild** the container, you will have to **reinstall** anything you've installed manually. To avoid this problem, you can use the `postCreateCommand` property in `devcontainer.json`. However, if you **rebuild** the container, you will have to **reinstall** anything you've installed manually. To avoid this problem, you can use the `postCreateCommand` property in `devcontainer.json`.
@ -193,7 +193,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
### Automate dev container creation ### Automate dev container creation
Rather than creating a `.devcontainer` by hand, selecting the **Remote-Containers: Add Development Container Configuration Files...** command from the Command Palette (`kbstyle(F1)`) will add the needed files to your project as a starting point, which you can further customize for your needs. Rather than creating a `.devcontainer` by hand, selecting the **Dev Containers: Add Dev Container Configuration Files...** command from the Command Palette (`kbstyle(F1)`) will add the needed files to your project as a starting point, which you can further customize for your needs.
The command lets you pick a pre-defined container configuration from a list based on your folder's contents: The command lets you pick a pre-defined container configuration from a list based on your folder's contents:
@ -201,7 +201,7 @@ The command lets you pick a pre-defined container configuration from a list base
All of the predefined container configurations you can pick from come from the [vscode-dev-containers repository](https://aka.ms/vscode-dev-containers), which has examples of `devcontainer.json` and Dockerfiles for different scenarios. All of the predefined container configurations you can pick from come from the [vscode-dev-containers repository](https://aka.ms/vscode-dev-containers), which has examples of `devcontainer.json` and Dockerfiles for different scenarios.
At the end of using **Remote-Containers: Add Development Container Configuration Files...**, you'll be shown the list of available features, which are tools and languages you can easily drop into your dev container. **Remote-Containers: Configure Container Features** allows you to update an existing configuration. At the end of using **Dev Containers: Add Dev Container Configuration Files...**, you'll be shown the list of available features, which are tools and languages you can easily drop into your dev container. **Dev Containers: Configure Container Features** allows you to update an existing configuration.
![Dev container features in Command Palette](images/containers/container-features.png) ![Dev container features in Command Palette](images/containers/container-features.png)
@ -219,27 +219,27 @@ Here is the typical edit loop using these commands:
![Container edit loop illustration](images/containers/container-edit-loop.png) ![Container edit loop illustration](images/containers/container-edit-loop.png)
1. Start with **Remote-Containers: Add Development Container Configuration Files...** in the Command Palette (`kbstyle(F1)`). 1. Start with **Dev Containers: Add Dev Container Configuration Files...** in the Command Palette (`kbstyle(F1)`).
2. Edit the contents of the `.devcontainer` folder as required. 2. Edit the contents of the `.devcontainer` folder as required.
3. Try it with **Remote-Containers: Reopen in Container**. 3. Try it with **Dev Containers: Reopen in Container**.
4. If you see an error, select **Open Folder Locally** in the dialog that appears. 4. If you see an error, select **Open Folder Locally** in the dialog that appears.
5. After the window reloads, a copy of the **build log** will appear in the console so you can investigate the problem. Edit the contents of the `.devcontainer` folder as required. (You can also use the **Remote-Containers: Open Log File...** command to see the log again if you close it.) 5. After the window reloads, a copy of the **build log** will appear in the console so you can investigate the problem. Edit the contents of the `.devcontainer` folder as required. (You can also use the **Dev Containers: Show Container Log** command to see the log again if you close it.)
6. Run **Remote-Containers: Rebuild and Reopen in Container** and jump to step 4 if needed. 6. Run **Dev Containers: Rebuild and Reopen in Container** and jump to step 4 if needed.
If you already have a successful build, you can still edit the contents of the `.devcontainer` folder as required when connected to the container and then select **Remote-Containers: Rebuild Container** in the Command Palette (`kbstyle(F1)`) so the changes take effect. If you already have a successful build, you can still edit the contents of the `.devcontainer` folder as required when connected to the container and then select **Dev Containers: Rebuild Container** in the Command Palette (`kbstyle(F1)`) so the changes take effect.
You can also iterate on your container when using the **Remote-Containers: Clone Repository in Container Volume** command. You can also iterate on your container when using the **Dev Containers: Clone Repository in Container Volume** command.
1. Start with **Remote-Containers: Clone Repository in Container Volume** in the Command Palette (`kbstyle(F1)`). If the repository you enter does not have a `devcontainer.json` in it, you'll be asked to select a starting point. 1. Start with **Dev Containers: Clone Repository in Container Volume** in the Command Palette (`kbstyle(F1)`). If the repository you enter does not have a `devcontainer.json` in it, you'll be asked to select a starting point.
2. Edit the contents of the `.devcontainer` folder as required. 2. Edit the contents of the `.devcontainer` folder as required.
3. Try it with **Remote-Containers: Rebuild Container**. 3. Try it with **DEv Containers: Rebuild Container**.
4. If you see an error, select **Open in Recovery Container** in the dialog that appears. 4. If you see an error, select **Open in Recovery Container** in the dialog that appears.
5. Edit the contents of the `.devcontainer` folder as required in this "recovery container." 5. Edit the contents of the `.devcontainer` folder as required in this "recovery container."
6. Use **Remote-Containers: Reopen in Container** and jump to step 4 if you still hit problems. 6. Use **Dev Containers: Reopen in Container** and jump to step 4 if you still hit problems.
## Use Docker Compose ## Use Docker Compose
In some cases, a single container environment isn't sufficient. Let's say you'd like to add another complex component to your configuration, like a database. You could attempt to add it to the Dockerfile directly, or you could add it through an additional container. Fortunately, Remote - Containers supports [Docker Compose](https://docs.docker.com/compose/) managed multi-container configurations. In some cases, a single container environment isn't sufficient. Let's say you'd like to add another complex component to your configuration, like a database. You could attempt to add it to the Dockerfile directly, or you could add it through an additional container. Fortunately, Dev Containers supports [Docker Compose](https://docs.docker.com/compose/) managed multi-container configurations.
You can either: You can either:
@ -252,7 +252,7 @@ You can either:
VS Code can be configured to **automatically start any needed containers** for a particular service in a Docker Compose file. If you've already started the configured containers using the command line, VS Code will **attach to the running service** you've specified instead. This gives your multi-container workflow the same quick setup advantages described for the Docker image and Dockerfile workflows above, while still allowing you to use the command line if you prefer. VS Code can be configured to **automatically start any needed containers** for a particular service in a Docker Compose file. If you've already started the configured containers using the command line, VS Code will **attach to the running service** you've specified instead. This gives your multi-container workflow the same quick setup advantages described for the Docker image and Dockerfile workflows above, while still allowing you to use the command line if you prefer.
To get started quickly, **open the folder** you want to work with in VS Code and run the **Remote-Containers: Add Development Container Configuration Files...** command in the Command Palette (`kbstyle(F1)`). To get started quickly, **open the folder** you want to work with in VS Code and run the **Dev Containers: Add Dev Container Configuration Files...** command in the Command Palette (`kbstyle(F1)`).
![Select Docker Compose File](images/containers/select-docker-compose.png) ![Select Docker Compose File](images/containers/select-docker-compose.png)
@ -281,7 +281,7 @@ For example:
See the [devcontainer.json reference](https://containers.dev/implementors/json_reference) for information other available properties such as the `workspaceFolder` and `shutdownAction`. See the [devcontainer.json reference](https://containers.dev/implementors/json_reference) for information other available properties such as the `workspaceFolder` and `shutdownAction`.
Once you have added a `.devcontainer/devcontainer.json` file to your folder, run the **Remote-Containers: Reopen in Container** command (or **Remote-Containers: Open Folder in Container...** if you are not yet in a container) from the Command Palette (`kbstyle(F1)`). Once you have added a `.devcontainer/devcontainer.json` file to your folder, run the **Dev Containers: Reopen in Container** command (or **Dev Containers: Open Folder in Container...** if you are not yet in a container) from the Command Palette (`kbstyle(F1)`).
If the containers are not already running, VS Code will call `docker-compose -f ../docker-compose.yml up` in this example. The `service` property indicates which service in your Docker Compose file VS Code should connect to, not which service should be started. If you started them by hand, VS Code will attach to the service you specified. If the containers are not already running, VS Code will call `docker-compose -f ../docker-compose.yml up` in this example. The `service` property indicates which service in your Docker Compose file VS Code should connect to, not which service should be started. If you started them by hand, VS Code will attach to the service you specified.
@ -339,7 +339,7 @@ security_opt:
- seccomp:unconfined - seccomp:unconfined
``` ```
After you create your container for the first time, you will need to run the **Remote-Containers: Rebuild Container** command for updates to `devcontainer.json`, your Docker Compose files, or related Dockerfiles to take effect. After you create your container for the first time, you will need to run the **Dev Containers: Rebuild Container** command for updates to `devcontainer.json`, your Docker Compose files, or related Dockerfiles to take effect.
### Using localhost in Docker Compose ### Using localhost in Docker Compose
@ -440,7 +440,7 @@ Congratulations! You've now configured a dev container in Visual Studio Code. Co
## Add configuration files to a repository ## Add configuration files to a repository
You can easily share a customized dev container definition for your project by adding `devcontainer.json` files to source control. By including these files in your repository, anyone that opens a local copy of your repo in VS Code will be automatically prompted to reopen the folder in a container, provided they have the Remote - Containers extension installed. You can easily share a customized dev container definition for your project by adding `devcontainer.json` files to source control. By including these files in your repository, anyone that opens a local copy of your repo in VS Code will be automatically prompted to reopen the folder in a container, provided they have the Dev Containers extension installed.
![Dev container configuration file reopen notification](images/containers/dev-container-reopen-prompt.png) ![Dev container configuration file reopen notification](images/containers/dev-container-reopen-prompt.png)
@ -448,29 +448,29 @@ Beyond the advantages of having your team use a consistent environment and tool-
### Add an open in dev container badge ### Add an open in dev container badge
You may also add a badge or link in your repository so that users can easily open your project in Remote - Containers. It will install the Remote - Containers extension if necessary, clone the repo into a container [volume](/remote/advancedcontainers/improve-performance.md#use-clone-repository-in-container-volume), and start up the dev container. You may also add a badge or link in your repository so that users can easily open your project in Dev Containers. It will install the Dev Containers extension if necessary, clone the repo into a container [volume](/remote/advancedcontainers/improve-performance.md#use-clone-repository-in-container-volume), and start up the dev container.
As an example, a badge to open [https://github.com/microsoft/vscode-remote-try-java](https://github.com/microsoft/vscode-remote-try-java) would look like: As an example, a badge to open [https://github.com/microsoft/vscode-remote-try-java](https://github.com/microsoft/vscode-remote-try-java) would look like:
```markdown ```markdown
[![Open in Remote - Containers](https://img.shields.io/static/v1?label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-java) [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-java)
``` ```
You can also include an `open in dev container` link directly: You can also include an `open in dev container` link directly:
```markdown ```markdown
If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-java) to get started. Clicking these links will cause VS Code to automatically install the Remote - Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use. If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-java) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
``` ```
### Alternative: Repository configuration folders ### Alternative: Repository configuration folders
In some cases, you may want to create a configuration for a repository that you do not control or that you would prefer didn't have a configuration included in the repository itself. To handle this situation, you can configure a location on your local filesystem to store configuration files that will be picked up automatically based on the repository. In some cases, you may want to create a configuration for a repository that you do not control or that you would prefer didn't have a configuration included in the repository itself. To handle this situation, you can configure a location on your local filesystem to store configuration files that will be picked up automatically based on the repository.
First, update the **Remote > Containers: Repository Configuration Paths** [User setting](/docs/getstarted/settings.md) with the local folder you want to use to store your repository container configuration files. First, update the **Dev > Containers: Repository Configuration Paths** [User setting](/docs/getstarted/settings.md) with the local folder you want to use to store your repository container configuration files.
In the Settings editor: In the Settings editor:
![Repository container folders setting](images/containers/repo-container-folder-setting.png) ![Repository container folders setting](images/containers/repo-container-folder-setting.png) <!-- TBD update screenshot -->
Next, place your `.devcontainer/devcontainer.json` (and related files) in a sub folder that mirrors the remote location of the repository. For example, if you wanted to create a configuration for `github.com/microsoft/vscode-dev-containers`, you would create the following folder structure: Next, place your `.devcontainer/devcontainer.json` (and related files) in a sub folder that mirrors the remote location of the repository. For example, if you wanted to create a configuration for `github.com/microsoft/vscode-dev-containers`, you would create the following folder structure:
@ -481,9 +481,9 @@ Next, place your `.devcontainer/devcontainer.json` (and related files) in a sub
📁 .devcontainer 📁 .devcontainer
``` ```
Once in place, the configuration will be automatically picked up when using any of the remote containers commands. Once in the container, you can also select **Remote-Containers: Open Container Configuration File** from the Command Palette (`kbstyle(F1)`) to open the related `devcontainer.json` file and make further edits. Once in place, the configuration will be automatically picked up when using any of the Dev Containers commands. Once in the container, you can also select **Dev Containers: Open Container Configuration File** from the Command Palette (`kbstyle(F1)`) to open the related `devcontainer.json` file and make further edits.
The path used for looking up the configuration is derived from the output of `git remote -v`. If the configuration is not found when you attempt to reopen the folder in a container, check the log **Remote-Containers: Show Container Log** in the Command Palette (`kbstyle(F1)`) for the list of the paths that were checked. The path used for looking up the configuration is derived from the output of `git remote -v`. If the configuration is not found when you attempt to reopen the folder in a container, check the log **Dev Containers: Show Container Log** in the Command Palette (`kbstyle(F1)`) for the list of the paths that were checked.
## Next steps ## Next steps

Просмотреть файл

@ -19,7 +19,7 @@ Containers (for example [Docker](https://www.docker.com) containers) have histor
![Diagram comparing dev versus production containers](images/devcontainer-cli/dev-container-stages.png) ![Diagram comparing dev versus production containers](images/devcontainer-cli/dev-container-stages.png)
Development containers are supported in Visual Studio Code via the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and in [GitHub Codespaces](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers). This support is backed by [devcontainer.json](https://containers.dev/implementors/json_reference), a structured JSON with Comments (jsonc) metadata format to configure a containerized environment. Development containers are supported in Visual Studio Code via the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and in [GitHub Codespaces](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers). This support is backed by [devcontainer.json](https://containers.dev/implementors/json_reference), a structured JSON with Comments (jsonc) metadata format to configure a containerized environment.
As containerizing production workloads becomes commonplace, dev containers have become broadly useful for scenarios beyond VS Code. To promote dev containers in any environment, work has started on the [Development Containers Specification](https://github.com/devcontainers/spec), which empowers anyone in any tool to configure a consistent dev environment. The open-source **dev container CLI** serves as the reference implementation of the specification. As containerizing production workloads becomes commonplace, dev containers have become broadly useful for scenarios beyond VS Code. To promote dev containers in any environment, work has started on the [Development Containers Specification](https://github.com/devcontainers/spec), which empowers anyone in any tool to configure a consistent dev environment. The open-source **dev container CLI** serves as the reference implementation of the specification.
@ -27,7 +27,7 @@ As containerizing production workloads becomes commonplace, dev containers have
When tools like VS Code and Codespaces detect a `devcontainer.json` file in a user's project, they use a CLI to configure a dev container. The dev container CLI is a reference implementation so that individual users and other tools can read in `devcontainer.json` metadata and create dev containers from it. When tools like VS Code and Codespaces detect a `devcontainer.json` file in a user's project, they use a CLI to configure a dev container. The dev container CLI is a reference implementation so that individual users and other tools can read in `devcontainer.json` metadata and create dev containers from it.
This CLI can either be used directly or integrated into product experiences, similar to how it's integrated with Remote - Containers and Codespaces today. It currently supports both a simple single container option and integrates with [Docker Compose](https://docs.docker.com/compose/) for multi-container scenarios. This CLI can either be used directly or integrated into product experiences, similar to how it's integrated with Dev Containers and Codespaces today. It currently supports both a simple single container option and integrates with [Docker Compose](https://docs.docker.com/compose/) for multi-container scenarios.
The CLI is available for review in a new [devcontainers/cli](https://github.com/devcontainers/cli) repository and you can read more about its development in [this issue in the spec repo](https://github.com/devcontainers/spec/issues/9). The CLI is available for review in a new [devcontainers/cli](https://github.com/devcontainers/cli) repository and you can read more about its development in [this issue in the spec repo](https://github.com/devcontainers/spec/issues/9).
@ -116,7 +116,7 @@ This will compile and run the Rust sample, outputting:
Compiling hello_remote_world v0.1.0 (/workspaces/vscode-remote-try-rust) Compiling hello_remote_world v0.1.0 (/workspaces/vscode-remote-try-rust)
Finished dev [unoptimized + debuginfo] target(s) in 1.06s Finished dev [unoptimized + debuginfo] target(s) in 1.06s
Running `target/debug/hello_remote_world` Running `target/debug/hello_remote_world`
Hello, VS Code Remote - Containers! Hello, VS Code Dev Containers!
{"outcome":"success"} {"outcome":"success"}
``` ```
@ -128,7 +128,7 @@ If you'd like to use the dev container CLI in your CI/CD builds or test automati
## Pre-building ## Pre-building
The `devcontainer build` command allows you to quickly build a dev container image following the same steps as used by the Remote - Containers extension or GitHub Codespaces. This is particularly useful when you want to pre-build a dev container image using a CI or DevOps product like GitHub Actions. The `devcontainer build` command allows you to quickly build a dev container image following the same steps as used by the Dev Containers extension or GitHub Codespaces. This is particularly useful when you want to pre-build a dev container image using a CI or DevOps product like GitHub Actions.
`build` accepts a path to the folder containing a `.devcontainer` folder or `.devcontainer.json` file. For example, `devcontainer build --workspace-folder <my_repo>` will build the container image for `my_repo`. `build` accepts a path to the folder containing a `.devcontainer` folder or `.devcontainer.json` file. For example, `devcontainer build --workspace-folder <my_repo>` will build the container image for `my_repo`.

Просмотреть файл

@ -13,7 +13,7 @@ DateApproved: 9/1/2022
## Dev container specification ## Dev container specification
As mentioned in the main [Remote - Containers documentation](/docs/remote/containers.md), we're creating the **Development Containers Specification** to empower anyone in any tool to configure a consistent dev environment. As mentioned in the main [Dev Containers documentation](/docs/remote/containers.md), we're creating the **Development Containers Specification** to empower anyone in any tool to configure a consistent dev environment.
The `devcontainer.json` reference is [hosted on the specification site](https://containers.dev/implementors/json_reference). Here you can also review the [devcontainer.json schema](https://containers.dev/implementors/json_schema). The `devcontainer.json` reference is [hosted on the specification site](https://containers.dev/implementors/json_reference). Here you can also review the [devcontainer.json schema](https://containers.dev/implementors/json_schema).
@ -21,6 +21,6 @@ You can also review the specification documents and latest proposals in the [dev
## Additional resources ## Additional resources
[Create a development container](/docs/remote/create-dev-container.md) has more information on configuring a dev container, or you can use the **Remote-Containers: Add Development Container Configuration Files...** or **Codespaces: Add Development Container Configuration Files...** commands from the Command Palette (`kbstyle(F1)`) to add a wide variety of base configurations. [Create a development container](/docs/remote/create-dev-container.md) has more information on configuring a dev container, or you can use the **Dev Containers: Add Dev Container Configuration Files...** or **Codespaces: Add Dev Container Configuration Files...** commands from the Command Palette (`kbstyle(F1)`) to add a wide variety of base configurations.
> **Tip:** If you've already built a container and connected to it, be sure to run **Remote-Containers: Rebuild Container** or **Codespaces: Rebuild Container** from the Command Palette (`kbstyle(F1)`) to pick up any changes you make. > **Tip:** If you've already built a container and connected to it, be sure to run **Dev Containers: Rebuild Container** or **Codespaces: Rebuild Container** from the Command Palette (`kbstyle(F1)`) to pick up any changes you make.

Просмотреть файл

@ -64,7 +64,7 @@ Installation of VS Code Server requires that your local machine have outbound HT
By default, the Remote - SSH will attempt to download on the remote host, but if you enable `remote.SSH.allowLocalServerDownload`, the extension will fall back to downloading VS Code Server locally and transferring it remotely once a connection is established. By default, the Remote - SSH will attempt to download on the remote host, but if you enable `remote.SSH.allowLocalServerDownload`, the extension will fall back to downloading VS Code Server locally and transferring it remotely once a connection is established.
The Remote - Containers extension always downloads locally and transfers into the container. The Dev Containers extension always downloads locally and transfers into the container.
You can install extensions manually without an internet connection using the **Extensions: Install from VSIX...** command, but if you use the extension panel or `devcontainer.json` to install extensions, your local machine and VS Code Server will need outbound HTTPS (port 443) access to: You can install extensions manually without an internet connection using the **Extensions: Install from VSIX...** command, but if you use the extension panel or `devcontainer.json` to install extensions, your local machine and VS Code Server will need outbound HTTPS (port 443) access to:
@ -91,11 +91,11 @@ You can use one of the following solutions to resolve this problem:
* Open a new local window (**File > New Window**) and use it to work with local containers. * Open a new local window (**File > New Window**) and use it to work with local containers.
* Install the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension and use the [Remote Explorer](/docs/remote/containers.md#managing-containers) in situations when you need to see your local containers. * Install the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension and use the [Remote Explorer](/docs/remote/containers.md#managing-containers) in situations when you need to see your local containers.
* **Remote - WSL only**: Use the [Docker Technical Preview for WSL 2](https://docs.docker.com/docker-for-windows/wsl-tech-preview/) or [configure Docker Desktop for use in WSL 1](https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly). * **WSL only**: Use the [Docker Technical Preview for WSL 2](https://docs.docker.com/docker-for-windows/wsl-tech-preview/) or [configure Docker Desktop for use in WSL 1](https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly).
* **Remote - Containers only**: Forward the [Docker socket and install the Docker CLI](https://aka.ms/vscode-remote/samples/docker-from-docker) (only) in the container. * **Dev Containers only**: Forward the [Docker socket and install the Docker CLI](https://aka.ms/vscode-remote/samples/docker-from-docker) (only) in the container.
* Use the [extensionKind property](/docs/remote/containers.md#advanced-forcing-an-extension-to-run-locally-or-remotely) to force the extension to be `ui`. However, this will prevent some commands from working. * Use the [extensionKind property](/docs/remote/containers.md#advanced-forcing-an-extension-to-run-locally-or-remotely) to force the extension to be `ui`. However, this will prevent some commands from working.
@ -103,7 +103,7 @@ You can use one of the following solutions to resolve this problem:
Remote Development requires kernel >= 3.10, glibc >=2.17, and libstdc++ >= 3.4.18. Recent x86_64 glibc-based distributions have the best support, but exact requirements can vary by distribution. Remote Development requires kernel >= 3.10, glibc >=2.17, and libstdc++ >= 3.4.18. Recent x86_64 glibc-based distributions have the best support, but exact requirements can vary by distribution.
Support for musl-based [Alpine Linux](https://alpinelinux.org) is available for Remote - Containers and Remote - WSL and ARMv7l (AArch32) / ARMv8l (AArch64) is available in Remote - SSH. However, native dependencies in certain extensions may cause them not to function on non-x86_64 glibc distributions. Note that experimental ARMv8l (AArch64) is available in [VS Code Insiders](https://code.visualstudio.com/insiders/) only. Support for musl-based [Alpine Linux](https://alpinelinux.org) is available for the Dev Containers and WSL extensions and ARMv7l (AArch32) / ARMv8l (AArch64) is available in Remote - SSH. However, native dependencies in certain extensions may cause them not to function on non-x86_64 glibc distributions. Note that experimental ARMv8l (AArch64) is available in [VS Code Insiders](https://code.visualstudio.com/insiders/) only.
See [Remote Development with Linux](/docs/remote/linux.md) for additional details. See [Remote Development with Linux](/docs/remote/linux.md) for additional details.
@ -112,30 +112,30 @@ See [Remote Development with Linux](/docs/remote/linux.md) for additional detail
Yes. The [Remote Development extension pack](https://aka.ms/vscode-remote/download/extension) provides a convenient way for you to access all of the latest remote capabilities as they are released. However, you can always install the individual extensions from the Marketplace or VS Code Extensions view. Yes. The [Remote Development extension pack](https://aka.ms/vscode-remote/download/extension) provides a convenient way for you to access all of the latest remote capabilities as they are released. However, you can always install the individual extensions from the Marketplace or VS Code Extensions view.
* [Remote - SSH](https://aka.ms/vscode-remote/download/ssh) * [Remote - SSH](https://aka.ms/vscode-remote/download/ssh)
* [Remote - Containers](https://aka.ms/vscode-remote/download/containers) * [Dev Containers](https://aka.ms/vscode-remote/download/containers)
* [Remote - WSL](https://aka.ms/vscode-remote/download/wsl) * [WSL](https://aka.ms/vscode-remote/download/wsl)
## How can I review and configure extension settings? ## How can I review and configure extension settings?
As with [other parts of Visual Studio Code](/docs/getstarted/settings.md), you can customize each of the Remote Development extensions through their settings. Using Remote - Containers as an example, you may review a list of all Remote - Containers settings by opening the extension in the Extensions view (`kb(workbench.view.extensions)`), and navigating to **Feature Contributions**: As with [other parts of Visual Studio Code](/docs/getstarted/settings.md), you can customize each of the Remote Development extensions through their settings. Using Dev Containers as an example, you may review a list of all Dev Containers settings by opening the extension in the Extensions view (`kb(workbench.view.extensions)`), and navigating to **Feature Contributions**:
![List of settings in Feature Contributions](images/containers/feature-contributions.png) ![List of settings in Feature Contributions](images/containers/feature-contributions.png) <!-- TBD update screenshot -->
## Remote - WSL ## WSL
### What is the advantage of the extension over using WSL as the terminal? ### What is the advantage of the extension over using WSL as the terminal?
You can think of WSL as a Linux machine running on Windows, where you can install Linux specific frameworks/tools (for example Python, Go, Rust, etc.) without impacting your Windows setup. You can then use VS Code and the Remote - WSL extension to develop in the context of what is installed in WSL, isolated from what is installed on Windows. You can think of WSL as a Linux machine running on Windows, where you can install Linux specific frameworks/tools (for example Python, Go, Rust, etc.) without impacting your Windows setup. You can then use VS Code and the WSL extension to develop in the context of what is installed in WSL, isolated from what is installed on Windows.
For example, you might install the Go stack in WSL (compiler, debugger, linters, etc.). If you run VS Code only on Windows, you must also install the same Go stack there to get features like smart completions, debugging, Go to Definition navigation. And because the language services are running on Windows, they dont know what is in WSL. For example, you might install the Go stack in WSL (compiler, debugger, linters, etc.). If you run VS Code only on Windows, you must also install the same Go stack there to get features like smart completions, debugging, Go to Definition navigation. And because the language services are running on Windows, they dont know what is in WSL.
Its true that you can run binaries in WSL from Windows and vice-versa, but regular VS Code extensions dont know how to do this. This is how we started out supporting debugging in WSL, but quickly realized we would have to update all extensions to know about WSL. Its true that you can run binaries in WSL from Windows and vice-versa, but regular VS Code extensions dont know how to do this. This is how we started out supporting debugging in WSL, but quickly realized we would have to update all extensions to know about WSL.
We decided instead to make parts of VS Code run in WSL and let the UI running on Windows talk to the VS Code server running in WSL. This is what the Remote - WSL extension enables and with it, the Go extension runs in WSL along with the rest of the Go tools (compiler, debugger, linters), while VS Code runs on Windows. We decided instead to make parts of VS Code run in WSL and let the UI running on Windows talk to the VS Code server running in WSL. This is what the WSL extension enables and with it, the Go extension runs in WSL along with the rest of the Go tools (compiler, debugger, linters), while VS Code runs on Windows.
With this approach, language features like smart completions just work against what is in WSL without having to set up anything on Windows. You don't have to worry about path issues or set up different versions of development stacks on Windows. If you are deploying applications to Linux, you can set up your WSL instances to look like your runtime environment while still getting a rich editing experience on Windows. With this approach, language features like smart completions just work against what is in WSL without having to set up anything on Windows. You don't have to worry about path issues or set up different versions of development stacks on Windows. If you are deploying applications to Linux, you can set up your WSL instances to look like your runtime environment while still getting a rich editing experience on Windows.
## Remote - Containers ## Dev Containers
### Do "dev container definitions" define how an application is deployed? ### Do "dev container definitions" define how an application is deployed?
@ -168,8 +168,8 @@ If your extension is not functioning as expected, [there are steps to check](/ap
You can find the licenses for the VS Code Remote Development extensions here: You can find the licenses for the VS Code Remote Development extensions here:
* [Remote-SSH License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh/license) * [Remote-SSH License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh/license)
* [Remote-WSL License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl/license) * [WSL License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl/license)
* [Remote-Containers License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers/license) * [Dev Containers License](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers/license)
### Why aren't the Remote Development extensions or their components open source? ### Why aren't the Remote Development extensions or their components open source?

Просмотреть файл

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20ce13c945d8f136de0e6127d49c1d8fbe1273936d209734ad9bfad1afd4e52c
size 34267

Просмотреть файл

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b523dca0959d1a03c29ed6b5197e39a311a5fd8cf01926dff3196bf21d32f341
size 56961

Просмотреть файл

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97315ec05eeeae3b19ecc1504d3130f7f9b76abeaea00b54ef7b37a9ae96d905
size 7027

Просмотреть файл

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ee32db2e2034bc4d246b39f5eb01a55e6ce05236dac5177941a10244496ca54
size 17211

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:2309779850a10e8c294eb9e48296fd1e0da5e10b2d68d6fad348ae0c5c8676bb oid sha256:75094bb2c9b37ca1033b0f13e43ab16a70f313c1be4504e646bd25a89b73eace
size 8415 size 23975

Просмотреть файл

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f0d875054eea4a87fc1f292f9ccdcef6bf2dc31e34e8f0c07f1b9e7e57e2403
size 26865

Просмотреть файл

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13923810c98ef53df2af45a62fcfed19df3f5efe6b3715ba3dd67bd334afba8c
size 28917

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:8ab4b1b60d38eebfdf9c6b39688b1ec1f139898dd73afb3e82c9603f1b10ea1f oid sha256:14903816bdd7975e0cd1f573c12dd7b2afad2bc3871936015c72822137c6350d
size 36079 size 60220

Просмотреть файл

@ -4,7 +4,7 @@ Area: remote
TOCTitle: Linux Prerequisites TOCTitle: Linux Prerequisites
PageTitle: Linux Prerequisites for Visual Studio Code Remote Development PageTitle: Linux Prerequisites for Visual Studio Code Remote Development
ContentId: 7ec8dedf-0659-437e-98f1-2d27f5e243eb ContentId: 7ec8dedf-0659-437e-98f1-2d27f5e243eb
MetaDescription: Linux Prerequisites for VS Code Remote - SSH, Remote - Containers, and Remote - WSL MetaDescription: Linux Prerequisites for VS Code Remote - SSH, Dev Containers, and WSL extensions
DateApproved: 9/1/2022 DateApproved: 9/1/2022
--- ---
# Remote Development with Linux # Remote Development with Linux
@ -17,7 +17,7 @@ The extensions are known to work when connecting to recent stable/LTS version of
* **Debian 64-bit x86, ARMv8l (AArch64)** (Stretch/9+) * **Debian 64-bit x86, ARMv8l (AArch64)** (Stretch/9+)
* **Raspberry Pi OS ARMv7l (AArch32) 32-bit** (Stretch/9+) (previously called Raspbian) * **Raspberry Pi OS ARMv7l (AArch32) 32-bit** (Stretch/9+) (previously called Raspbian)
* **CentOS / RHEL 64-bit x86** (7+) * **CentOS / RHEL 64-bit x86** (7+)
* **Alpine Linux 64-bit x86 containers or WSL hosts** (3.9+) in Remote - Containers, Remote - WSL * **Alpine Linux 64-bit x86 containers or WSL hosts** (3.9+) in Dev Containers, WSL
The following non-Linux SSH hosts are also supported: The following non-Linux SSH hosts are also supported:
@ -35,7 +35,7 @@ If you are running Linux locally, the [VS Code prerequisites](/docs/supporting/r
In addition, specific Remote Development extensions have further requirements: In addition, specific Remote Development extensions have further requirements:
* **Remote - SSH:** `ssh` needs to be in the path. The shell binary is typically in the `openssh-client` package. * **Remote - SSH:** `ssh` needs to be in the path. The shell binary is typically in the `openssh-client` package.
* **Remote - Containers**: Docker CE/EE 18.06+ and Docker Compose 1.21+. Follow the [official install instructions for Docker CE/EE for your distribution](https://docs.docker.com/install/#supported-platforms). If you are using Docker Compose, follow the [Install Docker Compose directions](https://docs.docker.com/compose/install/) as well. (Note that the Ubuntu Snap package is not supported and packages in distributions may be out of date.) `docker` and `docker-compose` must also be in the path. However, Docker does not need to be running if you are [using a remote host](https://aka.ms/vscode-remote/containers/remote-host). * **Dev Containers**: Docker CE/EE 18.06+ and Docker Compose 1.21+. Follow the [official install instructions for Docker CE/EE for your distribution](https://docs.docker.com/install/#supported-platforms). If you are using Docker Compose, follow the [Install Docker Compose directions](https://docs.docker.com/compose/install/) as well. (Note that the Ubuntu Snap package is not supported and packages in distributions may be out of date.) `docker` and `docker-compose` must also be in the path. However, Docker does not need to be running if you are [using a remote host](https://aka.ms/vscode-remote/containers/remote-host).
## Remote host / container / WSL Linux prerequisites ## Remote host / container / WSL Linux prerequisites
@ -48,7 +48,7 @@ You may encounter issues with certain extensions with native dependencies with *
| General | kernel >= 3.10, glibc >=2.17, libstdc++ >= 3.4.18, Python 2.6 or 2.7, tar | OpenSSH server, `bash`, and `curl` or `wget` | Run `ldd --version` to check the glibc version. Run `strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX` to see if libstdc++ 3.4.18 is available. | | General | kernel >= 3.10, glibc >=2.17, libstdc++ >= 3.4.18, Python 2.6 or 2.7, tar | OpenSSH server, `bash`, and `curl` or `wget` | Run `ldd --version` to check the glibc version. Run `strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX` to see if libstdc++ 3.4.18 is available. |
| Ubuntu 16.04+, Debian 8+, Raspberry Pi OS Stretch/9+ and downstream distributions | `libc6 libstdc++6 python-minimal ca-certificates tar` | `openssh-server bash` and `curl` or `wget` | Requires kernel >= 3.10, glibc >= 2.17, libstdc++ >= 3.4.18. Debian < 8 (Jessie) and Ubuntu < 14.04 do not meet this requirement. | | Ubuntu 16.04+, Debian 8+, Raspberry Pi OS Stretch/9+ and downstream distributions | `libc6 libstdc++6 python-minimal ca-certificates tar` | `openssh-server bash` and `curl` or `wget` | Requires kernel >= 3.10, glibc >= 2.17, libstdc++ >= 3.4.18. Debian < 8 (Jessie) and Ubuntu < 14.04 do not meet this requirement. |
| RHEL / CentOS 7+ | `glibc libgcc libstdc++ python ca-certificates tar` | `openssh-server bash` and `curl` or `wget` | Requires kernel >= 3.10, glibc >= 2.17, libstdc++ >= 3.4.18. RHEL / CentOS < 7 does not meet this requirement without using a [workaround to upgrade](#updating-glibc-and-libstdc-on-rhel-centos-6). | | RHEL / CentOS 7+ | `glibc libgcc libstdc++ python ca-certificates tar` | `openssh-server bash` and `curl` or `wget` | Requires kernel >= 3.10, glibc >= 2.17, libstdc++ >= 3.4.18. RHEL / CentOS < 7 does not meet this requirement without using a [workaround to upgrade](#updating-glibc-and-libstdc-on-rhel-centos-6). |
| Alpine Linux 3.9+ | `musl libgcc libstdc++`. musl >= 1.1.18, glibc not required. | Not yet supported. | Supported in Remote - Containers and Remote - WSL. Extensions installed in the container may not work due to `glibc` dependencies in extension native code. | | Alpine Linux 3.9+ | `musl libgcc libstdc++`. musl >= 1.1.18, glibc not required. | Not yet supported. | Supported in Dev Containers and WSL. Extensions installed in the container may not work due to `glibc` dependencies in extension native code. |
| openSUSE Leap / SUSE Linux Enterprise 15+|`glibc libgcc_s1 libstdc++6 python ca-certificates gzip tar`|`curl` or `wget` |Requires kernel >= 3.10, glibc, libstdc++6| | openSUSE Leap / SUSE Linux Enterprise 15+|`glibc libgcc_s1 libstdc++6 python ca-certificates gzip tar`|`curl` or `wget` |Requires kernel >= 3.10, glibc, libstdc++6|
## Tips by Linux distribution ## Tips by Linux distribution
@ -63,7 +63,7 @@ The following is a list of distributions and any base requirements that may be m
| Server Distribution | Docker Image | Missing libraries | Notes / additional steps | | Server Distribution | Docker Image | Missing libraries | Notes / additional steps |
|---------------------|--------------|-------------------|------------------| |---------------------|--------------|-------------------|------------------|
| ⚠️ Alpine Linux 3.10 (64-bit) | `alpine:3.10` | `libgcc libstdc++` | Supported in Remote - Containers and Remote - WSL only. Some extensions installed in the container may not work due to `glibc` dependencies in extension native code. | | ⚠️ Alpine Linux 3.10 (64-bit) | `alpine:3.10` | `libgcc libstdc++` | Supported in Dev Containers and WSL only. Some extensions installed in the container may not work due to `glibc` dependencies in extension native code. |
| ✅ CentOS 7 Server (64-bit) | `centos:7` | &lt;none&gt; | &lt;none&gt; | | ✅ CentOS 7 Server (64-bit) | `centos:7` | &lt;none&gt; | &lt;none&gt; |
| 🛑 CentOS 6 Server (64-bit) | `centos:6` | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). | | 🛑 CentOS 6 Server (64-bit) | `centos:6` | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). |
| ✅ Debian 10 Server (64-bit) | `debian:10` | &lt;none&gt; | &lt;none&gt; | | ✅ Debian 10 Server (64-bit) | `debian:10` | &lt;none&gt; | &lt;none&gt; |
@ -72,13 +72,13 @@ The following is a list of distributions and any base requirements that may be m
| ✅ openSUSE Leap Server 42.3 (64-bit) | `opensuse/leap:42.3` | Docker image is missing `tar` and `gzip`. | &lt;none&gt; | | ✅ openSUSE Leap Server 42.3 (64-bit) | `opensuse/leap:42.3` | Docker image is missing `tar` and `gzip`. | &lt;none&gt; |
| ✅ Oracle Linux 7 (64-bit) | `oraclelinux:7` | &lt;none&gt; | &lt;none&gt; | | ✅ Oracle Linux 7 (64-bit) | `oraclelinux:7` | &lt;none&gt; | &lt;none&gt; |
| 🛑️ Oracle Linux 6 (64-bit) | `oraclelinux:6` | `glibc` >= 2.17, `libstdc++` >= 3.4.18. Docker image is missing `tar`. | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). | | 🛑️ Oracle Linux 6 (64-bit) | `oraclelinux:6` | `glibc` >= 2.17, `libstdc++` >= 3.4.18. Docker image is missing `tar`. | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). |
| ⚠️ Raspberry Pi OS Stretch/9 (ARMv7l 32-bit) | &lt;n/a&gt; | &lt;none&gt; | Some extensions may not work when installed on an ARMv7l host due to extension x86 native code. Remote - Containers **does** support connecting to containers on an ARM host. | | ⚠️ Raspberry Pi OS Stretch/9 (ARMv7l 32-bit) | &lt;n/a&gt; | &lt;none&gt; | Some extensions may not work when installed on an ARMv7l host due to extension x86 native code. Dev Containers **does** support connecting to containers on an ARM host. |
| ✅ RedHat Enterprise Linux 7 (64-bit) | | &lt;none&gt; | &lt;none&gt; | | ✅ RedHat Enterprise Linux 7 (64-bit) | | &lt;none&gt; | &lt;none&gt; |
| 🛑 RedHat Enterprise Linux 6 (64-bit) | | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). | | 🛑 RedHat Enterprise Linux 6 (64-bit) | | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | [Requires a workaround](#updating-glibc-and-libstdc-on-rhel-centos-6). |
| ✅ SUSE Linux Enterprise Server 15 (64-bit) | | Docker image is missing `tar` and `gzip`. | &lt;none&gt; | | ✅ SUSE Linux Enterprise Server 15 (64-bit) | | Docker image is missing `tar` and `gzip`. | &lt;none&gt; |
| ✅ SUSE Linux Enterprise Server 12 (64-bit) | | Docker image is missing `tar` and `gzip`. | &lt;none&gt; | | ✅ SUSE Linux Enterprise Server 12 (64-bit) | | Docker image is missing `tar` and `gzip`. | &lt;none&gt; |
| ❌ SUSE Linux Enterprise Server 11 (64-bit) | | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | Might work compiling glibc from source, but untested. | | ❌ SUSE Linux Enterprise Server 11 (64-bit) | | `glibc` >= 2.17, `libstdc++` >= 3.4.18 | Might work compiling glibc from source, but untested. |
| ⚠️ Ubuntu 18.04 IoT (ARMv8l 64-bit) | | &lt;n/a&gt; | Some extensions may not work when installed on an ARMv8l host due to extension x86 native code. Remote - Containers **does** support connecting to containers on an ARM host. | | ⚠️ Ubuntu 18.04 IoT (ARMv8l 64-bit) | | &lt;n/a&gt; | Some extensions may not work when installed on an ARMv8l host due to extension x86 native code. Dev Containers **does** support connecting to containers on an ARM host. |
| ✅ Ubuntu Server 20.04 (64-bit) | `ubuntu:20.04` | &lt;none&gt; | &lt;none&gt; | | ✅ Ubuntu Server 20.04 (64-bit) | `ubuntu:20.04` | &lt;none&gt; | &lt;none&gt; |
| ✅ Ubuntu Server 19.04 (64-bit) | `ubuntu:19.04` | &lt;none&gt; | &lt;none&gt; | | ✅ Ubuntu Server 19.04 (64-bit) | `ubuntu:19.04` | &lt;none&gt; | &lt;none&gt; |
| ✅ Ubuntu Server 18.04 (64-bit) | `ubuntu:18.04` | &lt;none&gt; | &lt;none&gt; | | ✅ Ubuntu Server 18.04 (64-bit) | `ubuntu:18.04` | &lt;none&gt; | &lt;none&gt; |

Просмотреть файл

@ -30,8 +30,8 @@ DateApproved: 9/1/2022
The [Remote Development extension pack](https://aka.ms/vscode-remote/download/extension) includes three extensions. See the following articles to get started with each of them: The [Remote Development extension pack](https://aka.ms/vscode-remote/download/extension) includes three extensions. See the following articles to get started with each of them:
- [Remote - SSH](/docs/remote/ssh.md) - Connect to any location by opening folders on a remote machine/VM using SSH. - [Remote - SSH](/docs/remote/ssh.md) - Connect to any location by opening folders on a remote machine/VM using SSH.
- [Remote - Containers](/docs/remote/containers.md) - Work with a separate toolchain or container-based application inside (or mounted into) a container. - [Dev Containers](/docs/remote/containers.md) - Work with a separate toolchain or container-based application inside (or mounted into) a container.
- [Remote - WSL](/docs/remote/wsl.md) - Get a Linux-powered development experience in the Windows Subsystem for Linux. - [WSL](/docs/remote/wsl.md) - Get a Linux-powered development experience in the Windows Subsystem for Linux.
While most VS Code extensions should work unmodified in a remote environment, extension authors can learn more at [Supporting Remote Development](/api/advanced-topics/remote-extensions.md). While most VS Code extensions should work unmodified in a remote environment, extension authors can learn more at [Supporting Remote Development](/api/advanced-topics/remote-extensions.md).

Просмотреть файл

@ -245,8 +245,8 @@ Congratulations, you've successfully completed this tutorial!
Next, check out the other Remote Development extensions. Next, check out the other Remote Development extensions.
* [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) * [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
* [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) * [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
Or get them all by installing the Or get them all by installing the
[Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack. [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack.

Просмотреть файл

@ -106,16 +106,16 @@ From here, [install any extensions](#managing-extensions) you want to use when c
### Open a folder on a remote SSH host in a container ### Open a folder on a remote SSH host in a container
If you are using a Linux or macOS SSH host, you can use the Remote - SSH and [Remote - Containers](/docs/remote/containers.md) extensions together to open a folder on your remote host inside of a container. You do not even need to have a Docker client installed locally. If you are using a Linux or macOS SSH host, you can use the Remote - SSH and [Dev Containers](/docs/remote/containers.md) extensions together to open a folder on your remote host inside of a container. You do not even need to have a Docker client installed locally.
To do so: To do so:
1. Follow the [installation](/docs/remote/containers.md#installation) steps for the Remote - Containers extension on your remote host. 1. Follow the [installation](/docs/remote/containers.md#installation) steps for the Dev Containers extension on your remote host.
1. **Optional:** Set up SSH [key based authentication](/docs/remote/troubleshooting.md#configuring-key-based-authentication) to the server so you do not need to enter your password multiple times. 1. **Optional:** Set up SSH [key based authentication](/docs/remote/troubleshooting.md#configuring-key-based-authentication) to the server so you do not need to enter your password multiple times.
1. Follow the [quick start](#connect-to-a-remote-host) for the Remote - SSH extension to connect to a host and open a folder there. 1. Follow the [quick start](#connect-to-a-remote-host) for the Remote - SSH extension to connect to a host and open a folder there.
1. Use the **Remote-Containers: Reopen in Container** command from the Command Palette (`kbstyle(F1)`, `kb(workbench.action.showCommands)`). 1. Use the **Dev Containers: Reopen in Container** command from the Command Palette (`kbstyle(F1)`, `kb(workbench.action.showCommands)`).
The rest of the [Remote - Containers quick start](/docs/remote/containers.md#quick-start-open-an-existing-folder-in-a-container) applies as-is. You can learn more about the [Remote - Containers extension in its documentation](/docs/remote/containers.md). You can also see the [Develop on a remote Docker host](/remote/advancedcontainers/develop-remote-host.md) article for other options if this model does not meet your needs. The rest of the [Dev Containers quick start](/docs/remote/containers.md#quick-start-open-an-existing-folder-in-a-container) applies as-is. You can learn more about the [Dev Containers extension in its documentation](/docs/remote/containers.md). You can also see the [Develop on a remote Docker host](/remote/advancedcontainers/develop-remote-host.md) article for other options if this model does not meet your needs.
### Disconnect from a remote host ### Disconnect from a remote host
@ -291,7 +291,7 @@ SSHFS is the most convenient option and does not require any file sync'ing. Howe
- PuTTY is not supported on Windows. - PuTTY is not supported on Windows.
- If you clone a Git repository using SSH and your SSH key has a passphrase, VS Code's pull and sync features may hang when running remotely. Either use an SSH key without a passphrase, clone using HTTPS, or run `git push` from the command line to work around the issue. - If you clone a Git repository using SSH and your SSH key has a passphrase, VS Code's pull and sync features may hang when running remotely. Either use an SSH key without a passphrase, clone using HTTPS, or run `git push` from the command line to work around the issue.
- Local proxy settings are not reused on the remote host, which can prevent extensions from working unless the appropriate proxy information is configured on the remote host (for example global `HTTP_PROXY` or `HTTPS_PROXY` environment variables with the appropriate proxy information). - Local proxy settings are not reused on the remote host, which can prevent extensions from working unless the appropriate proxy information is configured on the remote host (for example global `HTTP_PROXY` or `HTTPS_PROXY` environment variables with the appropriate proxy information).
- You cannot use Remote - Containers from a Remote - SSH connection to a Windows machine. - You cannot use Dev Containers from a Remote - SSH connection to a Windows machine.
- See [here for a list of active issues](https://aka.ms/vscode-remote/ssh/issues) related to SSH. - See [here for a list of active issues](https://aka.ms/vscode-remote/ssh/issues) related to SSH.
### Docker Extension limitations ### Docker Extension limitations

Просмотреть файл

@ -538,7 +538,7 @@ You may want to use SSH to connect to a WSL distro running on your remote machin
## Container tips ## Container tips
This section includes some tips and tricks for getting the Remote - Containers extension up and running in different environments. This section includes some tips and tricks for getting the Dev Containers extension up and running in different environments.
If you are running into Docker issues or would prefer not to run Docker locally, you may want to try the preview of [GitHub Codespaces managed cloud-based environments](https://github.com/features/codespaces). Over time this service will support an increasing number of `devcontainer.json` properties and you can also use its browser-based editor in addition to VS Code. If you are running into Docker issues or would prefer not to run Docker locally, you may want to try the preview of [GitHub Codespaces managed cloud-based environments](https://github.com/features/codespaces). Over time this service will support an increasing number of `devcontainer.json` properties and you can also use its browser-based editor in addition to VS Code.
@ -548,7 +548,7 @@ If you are running into Docker issues or would prefer not to run Docker locally,
1. **Consider using the new Docker WSL 2 back-end on Windows 10 (2004+).** If you are using [Docker Desktop's WSL 2 back-end](https://aka.ms/vscode-remote/containers/docker-wsl2), you can you to open folders inside WSL as well as locally. Containers are also shared between Windows and inside WSL and this new engine is less susceptible to file sharing issues. See the [quick start](/docs/remote/containers.md#open-a-wsl-2-folder-in-a-container-on-windows) for details. 1. **Consider using the new Docker WSL 2 back-end on Windows 10 (2004+).** If you are using [Docker Desktop's WSL 2 back-end](https://aka.ms/vscode-remote/containers/docker-wsl2), you can you to open folders inside WSL as well as locally. Containers are also shared between Windows and inside WSL and this new engine is less susceptible to file sharing issues. See the [quick start](/docs/remote/containers.md#open-a-wsl-2-folder-in-a-container-on-windows) for details.
2. **Switch out of "Linux Containers on Windows (LCOW)" mode.** While disabled by default, recent versions of Docker support [Linux Containers on Windows (LCOW)](https://learn.microsoft.com/virtualization/windowscontainers/deploy-containers/linux-containers) that can allow you to use both Windows and Linux containers at the same time. However, this is a new feature, so you may encounter issues and the Remote - Containers extension only supports Linux containers currently. You can switch out of LCOW mode at any time by right-clicking on the Docker task bar item and selecting **Switch to Linux Containers...** from the context menu. 2. **Switch out of "Linux Containers on Windows (LCOW)" mode.** While disabled by default, recent versions of Docker support [Linux Containers on Windows (LCOW)](https://learn.microsoft.com/virtualization/windowscontainers/deploy-containers/linux-containers) that can allow you to use both Windows and Linux containers at the same time. However, this is a new feature, so you may encounter issues and the Dev Containers extension only supports Linux containers currently. You can switch out of LCOW mode at any time by right-clicking on the Docker task bar item and selecting **Switch to Linux Containers...** from the context menu.
3. **Make sure your firewall allows Docker to set up a shared drive.** Docker only needs to connect between two machine local IPs, but some firewall software may still block any drive sharing or the needed ports. See [this Docker KB article](https://success.docker.com/article/error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers) for next steps on resolving this problem. 3. **Make sure your firewall allows Docker to set up a shared drive.** Docker only needs to connect between two machine local IPs, but some firewall software may still block any drive sharing or the needed ports. See [this Docker KB article](https://success.docker.com/article/error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers) for next steps on resolving this problem.
@ -564,7 +564,7 @@ If you are still having trouble, see the [Docker Desktop for Windows troubleshoo
### Enabling file sharing in Docker Desktop ### Enabling file sharing in Docker Desktop
The VS Code [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension can only automatically mount your source code into a container if your code is in a folder or drive shared with Docker. If you open a dev container from a non-shared location, the container will successfully start but the workspace will be empty. The VS Code [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension can only automatically mount your source code into a container if your code is in a folder or drive shared with Docker. If you open a dev container from a non-shared location, the container will successfully start but the workspace will be empty.
Note that this step is **not required** with [Docker Desktop's WSL 2 engine](https://aka.ms/vscode-remote/containers/docker-wsl2). Note that this step is **not required** with [Docker Desktop's WSL 2 engine](https://aka.ms/vscode-remote/containers/docker-wsl2).
@ -823,13 +823,13 @@ On Windows 10 April 2018 Update (build 1803) and older, `/bin/bash` is required:
apk update && apk add bash apk update && apk add bash
``` ```
### Selecting the distribution used by Remote - WSL ### Selecting the distribution used by the WSL extension
**Remote-WSL: New Window** will open the WSL distro registered as default. **WSL: New Window** will open the WSL distro registered as default.
To open a non-default distro, run `code .` from the WSL shell of the distro to use or use **Remote-WSL: New Window using Distro**. To open a non-default distro, run `code .` from the WSL shell of the distro to use or use **WSL: New Window using Distro**.
With WSL versions older than Windows 10, May 2019 Update (version 1903), the WSL command can only use the **default distro**. For this reason, the Remote- WSL might prompt you if you agree to change the default distro. With WSL versions older than Windows 10, May 2019 Update (version 1903), the WSL command can only use the **default distro**. For this reason, the WSL extension might prompt you if you agree to change the default distro.
You can always use [wslconfig.exe](https://learn.microsoft.com/windows/wsl/wsl-config) to change your default. You can always use [wslconfig.exe](https://learn.microsoft.com/windows/wsl/wsl-config) to change your default.
@ -847,7 +847,7 @@ wslconfig /l
### Configure the environment for the server startup ### Configure the environment for the server startup
When the Remote WSL extension starts the VS Code server in WSL, it does not run any shell configuration scripts. This was done to avoid that custom configuration scripts can prevent the startup. When the WSL extension starts the VS Code server in WSL, it does not run any shell configuration scripts. This was done to avoid that custom configuration scripts can prevent the startup.
If you need to configure the startup environment, you can use the environment setup script as described [here](/docs/remote/wsl.md#advanced-environment-setup-script). If you need to configure the startup environment, you can use the environment setup script as described [here](/docs/remote/wsl.md#advanced-environment-setup-script).
@ -908,7 +908,7 @@ Please file an issue and attach the full output.
When the WSL window fails to connect to the remote server, you can get more information in the WSL log. When filing an issue, it is important to always send the full content of the WSL log. When the WSL window fails to connect to the remote server, you can get more information in the WSL log. When filing an issue, it is important to always send the full content of the WSL log.
Open the WSL log by running the command **Remote-WSL: Open Log**. The log will show in the terminal view under the WSL tab. Open the WSL log by running the command **WSL: Open Log**. The log will show in the terminal view under the WSL tab.
![WSL Log](images/troubleshooting/wsl-log.png) ![WSL Log](images/troubleshooting/wsl-log.png)
@ -918,15 +918,16 @@ To get even more verbose logging, enable the setting `remote.WSL.debug` in the u
You can help us investigate this problem by sending us the core dump file. To get the core dump file, follow these steps: You can help us investigate this problem by sending us the core dump file. To get the core dump file, follow these steps:
* Open a Windows command prompt, In a Windows command prompt:
* run `code --locate-extension ms-vscode-remote.remote-wsl` to determine the Remote-WSL extension folder.
* Run `code --locate-extension ms-vscode-remote.remote-wsl` to determine the WSL extension folder.
* `cd` to the path that is returned. * `cd` to the path that is returned.
* Open the `wslServer.sh` script with VS Code, `code .\scripts\wslServer.sh`. * Open the `wslServer.sh` script with VS Code, `code .\scripts\wslServer.sh`.
* Before the last line (before `"$VSCODE_REMOTE_BIN/$COMMIT/bin/$SERVER_APPNAME" "$@"`), add * Before the last line (before `"$VSCODE_REMOTE_BIN/$COMMIT/bin/$SERVER_APPNAME" "$@"`), add
`ulimit -C unlimited`. `ulimit -C unlimited`.
* Start the Remote-WSL window running the remote server and wait for the segmentation fault. * Start the WSL window running the remote server and wait for the segmentation fault.
The core file will be in the Remote-WSL extension folder from above. The core file will be in the WSL extension folder from above.
### I see EACCESS: permission denied error trying to rename a folder in the open workspace ### I see EACCESS: permission denied error trying to rename a folder in the open workspace
@ -1116,9 +1117,9 @@ Each remote extension has a command to view its logs.
You can get the Remote - SSH extension logs with **Remote-SSH: Show Log** from the Command Palette (`kbstyle(F1)`). When reporting Remote - SSH issues, please also verify if you're able to SSH into your machine from an external terminal (not using Remote - SSH). You can get the Remote - SSH extension logs with **Remote-SSH: Show Log** from the Command Palette (`kbstyle(F1)`). When reporting Remote - SSH issues, please also verify if you're able to SSH into your machine from an external terminal (not using Remote - SSH).
Similarly, you can get the Remote - Containers extension logs with **Remote-Containers: Show Log**. Similarly, you can get the Dev Containers extension logs with **Dev Containers: Show Container Log**.
Like the two above, you can get the Remote - WSL logs with **Remote WSL: Show Log**. Also check whether your issue is being tracked upstream in the [WSL repo](https://github.com/microsoft/WSL/issues) (and is not due to the Remote - WSL extension). Like the two above, you can get the WSL extension logs with **WSL: Show Log**. Also check whether your issue is being tracked upstream in the [WSL repo](https://github.com/microsoft/WSL/issues) (and is not due to the WSL extension).
If you're experiencing issues using other extensions remotely (for example, other extensions aren't loading or installing properly in a remote context), it's helpful to grab the log from the **Remote Extension Host** output channel (**Output: Focus on Output View**), and select **Log (Remote Extension Host)** from the dropdown. If you're experiencing issues using other extensions remotely (for example, other extensions aren't loading or installing properly in a remote context), it's helpful to grab the log from the **Remote Extension Host** output channel (**Output: Focus on Output View**), and select **Log (Remote Extension Host)** from the dropdown.

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 9/1/2022
--- ---
# Remote development in WSL # Remote development in WSL
This tutorial walks you through enabling [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/install) (WSL) and running Visual Studio Code in WSL using the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension. This tutorial walks you through enabling [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl/install) (WSL) and running Visual Studio Code in WSL using the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension.
## Prerequisites ## Prerequisites
@ -17,21 +17,21 @@ You need [Visual Studio Code](https://code.visualstudio.com/) installed.
### Install the extension ### Install the extension
The Remote - WSL extension enables you to run Visual Studio Code within the Windows Subsystem for Linux (WSL). The WSL extension enables you to run Visual Studio Code within the Windows Subsystem for Linux (WSL).
> <a class="install-extension-btn" href="vscode:extension/ms-vscode-remote.remote-wsl">Install the Remote - WSL extension</a> > <a class="install-extension-btn" href="vscode:extension/ms-vscode-remote.remote-wsl">Install the WSL extension</a>
![Remote - WSL extension](images/wsl-tutorial/remote-wsl-extension.png) ![WSL extension](images/wsl-tutorial/remote-wsl-extension.png)
### Prerequisite check ### Prerequisite check
With the Remote - WSL extension installed, you will see a new Status bar item at the far left. With the WSL extension installed, you will see a new Status bar item at the far left.
![Remote Status bar item](images/wsl-tutorial/remote-status-bar.png) ![Remote Status bar item](images/wsl-tutorial/remote-status-bar.png)
The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Remote - WSL commands. The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the WSL extension commands.
![Remote - WSL commands](images/wsl-tutorial/remote-wsl-commands.png) ![WSL extension commands](images/wsl-tutorial/remote-wsl-commands.png) <!-- TBD update screenshot -->
## Enable WSL ## Enable WSL
@ -140,7 +140,7 @@ You'll start a new instance of the bash shell in WSL, again from VS Code running
**Tip**: In the lower left corner of the Status Bar, you can see that you're connected to your **WSL: Ubuntu** instance. **Tip**: In the lower left corner of the Status Bar, you can see that you're connected to your **WSL: Ubuntu** instance.
![Remote - WSL Status bar](images/wsl-tutorial/wsl-status-bar.png) ![WSL extension Status bar](images/wsl-tutorial/wsl-status-bar.png)
## Edit and debug ## Edit and debug
@ -201,7 +201,7 @@ Congratulations, you've successfully completed this tutorial!
Next, check out the other Remote Development extensions. Next, check out the other Remote Development extensions.
* [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) * [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh)
* [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) * [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
Or get them all by installing the Or get them all by installing the
[Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack. [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) Extension Pack.

Просмотреть файл

@ -9,7 +9,7 @@ DateApproved: 9/1/2022
--- ---
# Developing in WSL # Developing in WSL
The **Visual Studio Code Remote - WSL** extension lets you use the [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl) as your full-time development environment right from VS Code. You can develop in a Linux-based environment, use Linux-specific toolchains and utilities, and run and debug your Linux-based applications all from the comfort of Windows. The **Visual Studio Code WSL** extension lets you use the [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl) as your full-time development environment right from VS Code. You can develop in a Linux-based environment, use Linux-specific toolchains and utilities, and run and debug your Linux-based applications all from the comfort of Windows.
The extension runs commands and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example `/mnt/c`) without worrying about pathing issues, binary compatibility, or other cross-OS challenges. The extension runs commands and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example `/mnt/c`) without worrying about pathing issues, binary compatibility, or other cross-OS challenges.
@ -63,15 +63,15 @@ That's it! Any VS Code operations you perform in this window will be executed in
#### From VS Code #### From VS Code
Alternatively, you can open a Remote WSL window directly from VS Code: Alternatively, you can open a WSL window directly from VS Code:
1. Start VS Code. 1. Start VS Code.
2. Press `kbstyle(F1)`, select **Remote-WSL: New Window** for the default distro or **Remote-WSL: New Window using Distro** for a specific distro. 2. Press `kbstyle(F1)`, select **WSL: New WSL Window** for the default distro or **WSL: New WSL Window using Distro** for a specific distro.
3. Use the File menu to open your folder. 3. Use the File menu to open your folder.
If you already have a folder open, you can also use the **Remote-WSL: Reopen in WSL** command. You will be prompted which distro to use. If you already have a folder open, you can also use the **WSL: Reopen Folder in WSL** command. You will be prompted which distro to use.
If you are in a WSL window and want to open the current input in a local window, use **Remote-WSL: Reopen in Windows**. If you are in a WSL window and want to open the current input in a local window, use **WSL: Reopen in Windows**.
#### From the Windows command prompt #### From the Windows command prompt
@ -141,21 +141,21 @@ When VS Code Remote is started in WSL, no shell startup scripts are run. This wa
The script needs to be a valid Bourne shell script. Be aware that an invalid script will prevent the server from starting up. If you end up with a script that prevents the server from starting, you will have to use a regular WSL shell and delete or rename the setup script. The script needs to be a valid Bourne shell script. Be aware that an invalid script will prevent the server from starting up. If you end up with a script that prevents the server from starting, you will have to use a regular WSL shell and delete or rename the setup script.
Check the WSL log (Remote WSL: Open WSL Log) for output and errors. Check the WSL log (**WSL: Show Log**) for output and errors.
## Advanced: Opening a WSL 2 folder in a container ## Advanced: Opening a WSL 2 folder in a container
If you are using WSL 2 and [Docker Desktop's WSL 2 back-end](https://docs.docker.com/docker-for-windows/wsl-tech-preview/), you can use the [Remote - Containers](/docs/remote/containers.md) extension to work with source code stored inside WSL! Just follow these steps: If you are using WSL 2 and [Docker Desktop's WSL 2 back-end](https://docs.docker.com/docker-for-windows/wsl-tech-preview/), you can use the [Dev Containers](/docs/remote/containers.md) extension to work with source code stored inside WSL! Just follow these steps:
1. If you have not already, [install and setup](https://docs.docker.com/docker-for-windows/wsl-tech-preview/) Docker Desktop's WSL 2 support. 1. If you have not already, [install and setup](https://docs.docker.com/docker-for-windows/wsl-tech-preview/) Docker Desktop's WSL 2 support.
> **Tip:** Go to **Settings > Resources > WSL Integration** and enable Docker integration with the WSL distribution you will be using. > **Tip:** Go to **Settings > Resources > WSL Integration** and enable Docker integration with the WSL distribution you will be using.
2. If you have not already, install the [Remote - Containers](https://aka.ms/vscode-remote/download/containers) extension along with the WSL extension. 2. If you have not already, install the [Dev Containers](https://aka.ms/vscode-remote/download/containers) extension along with the WSL extension.
3. Next, [open your source code folder in WSL](#open-a-remote-folder-or-workspace) as you would normally. 3. Next, [open your source code folder in WSL](#open-a-remote-folder-or-workspace) as you would normally.
4. Once your folder is open in WSL, select **Remote-Containers: Reopen Folder in Container** from the Command Palette (`kbstyle(F1)`). 4. Once your folder is open in WSL, select **Dev Containers: Reopen in Container** from the Command Palette (`kbstyle(F1)`).
5. If the folder does not have a `.devcontainer/devcontainer.json` file in it, you'll be asked to pick a starting point from a filterable list or an existing [Dockerfile](https://docs.docker.com/engine/reference/builder/) or [Docker Compose file](https://docs.docker.com/compose/compose-file/#compose-file-structure-and-examples) (if one exists). 5. If the folder does not have a `.devcontainer/devcontainer.json` file in it, you'll be asked to pick a starting point from a filterable list or an existing [Dockerfile](https://docs.docker.com/engine/reference/builder/) or [Docker Compose file](https://docs.docker.com/compose/compose-file/#compose-file-structure-and-examples) (if one exists).
@ -167,7 +167,7 @@ If you are using WSL 2 and [Docker Desktop's WSL 2 back-end](https://docs.docker
7. After the build completes, VS Code will automatically connect to the container. You can now work with the your source code from inside the container. 7. After the build completes, VS Code will automatically connect to the container. You can now work with the your source code from inside the container.
See the [Remote - Containers documentation](/docs/remote/containers.md) for more information. See the [Dev Containers documentation](/docs/remote/containers.md) for more information.
## Known limitations ## Known limitations
@ -217,7 +217,7 @@ In addition, some extensions installed in an WSL when using an Alpine Linux-base
### Why am I asked to change the default distro? ### Why am I asked to change the default distro?
When using **Remote-WSL: New Window using Distro** and running on WSL older than Windows 10, May 2019 Update (version 1903) you will be asked to switch the **default distribution** as the WSL command can only work on the default distro as it does not support the `-d` option yet. When using **WSL: New WSL Window using Distro** and running on WSL older than Windows 10, May 2019 Update (version 1903) you will be asked to switch the **default distribution** as the WSL command can only work on the default distro as it does not support the `-d` option yet.
You can always manually switch the default distro by using [wslconfig.exe](https://learn.microsoft.com/windows/wsl/wsl-config). You can always manually switch the default distro by using [wslconfig.exe](https://learn.microsoft.com/windows/wsl/wsl-config).
@ -237,9 +237,9 @@ wslconfig /l
Some extensions rely on libraries not found in the vanilla install of certain WSL Linux distributions. You can add additional libraries into your Linux distribution by using its package manager. For Ubuntu and Debian based distributions, run `sudo apt-get install <package>` to install the needed libraries. Check the documentation for your extension or the runtime that is mentioned for additional installation details. Some extensions rely on libraries not found in the vanilla install of certain WSL Linux distributions. You can add additional libraries into your Linux distribution by using its package manager. For Ubuntu and Debian based distributions, run `sudo apt-get install <package>` to install the needed libraries. Check the documentation for your extension or the runtime that is mentioned for additional installation details.
### What are the connectivity requirements for the Remote - WSL extension? ### What are the connectivity requirements for the WSL extension?
The Remote - WSL extension and VS Code Server require outbound HTTPS (port 443) connectivity to: The WSL extension and VS Code Server require outbound HTTPS (port 443) connectivity to:
- `update.code.visualstudio.com` - `update.code.visualstudio.com`
- `marketplace.visualstudio.com` - `marketplace.visualstudio.com`
@ -255,7 +255,7 @@ All other communication between the server and the VS Code client is accomplishe
Proxy settings might be missing on either the Windows or the WSL side. Proxy settings might be missing on either the Windows or the WSL side.
When a remote window is opened out of VSCode, the Remote - WSL extension tries to download the VSCode server on the Windows side. It therefore uses the Window side proxy configuration: When a remote window is opened out of VSCode, the WSL extension tries to download the VSCode server on the Windows side. It therefore uses the Window side proxy configuration:
- inherited from the OS settings - inherited from the OS settings
- as described in [Network Connections in Visual Studio Code](/docs/setup/network) - as described in [Network Connections in Visual Studio Code](/docs/setup/network)

Просмотреть файл

@ -177,7 +177,7 @@ Another option for Linux development with VS Code is to use a Windows machine wi
With WSL, you can install and run Linux distributions on Windows. This enables you to develop and test your source code on Linux while still working locally on a Windows machine. WSL supports Linux distributions such as Ubuntu, Debian, SUSE, and Alpine available from the Microsoft Store. With WSL, you can install and run Linux distributions on Windows. This enables you to develop and test your source code on Linux while still working locally on a Windows machine. WSL supports Linux distributions such as Ubuntu, Debian, SUSE, and Alpine available from the Microsoft Store.
When coupled with the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of a Linux distro on WSL. When coupled with the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of a Linux distro on WSL.
See the [Developing in WSL](/docs/remote/wsl.md) documentation to learn more or try the [Working in WSL](/docs/remote/wsl-tutorial.md) introductory tutorial. See the [Developing in WSL](/docs/remote/wsl.md) documentation to learn more or try the [Working in WSL](/docs/remote/wsl-tutorial.md) introductory tutorial.

Просмотреть файл

@ -49,7 +49,7 @@ Make sure you are on a recent Windows 10 build. Check **Settings** > **Windows U
With WSL, you can install and run Linux distributions on Windows. This enables you to develop and test your source code on Linux while still working locally on your Windows machine. With WSL, you can install and run Linux distributions on Windows. This enables you to develop and test your source code on Linux while still working locally on your Windows machine.
When coupled with the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL. When coupled with the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, you get full VS Code editing and debugging support while running in the context of WSL.
See the [Developing in WSL](/docs/remote/wsl.md) documentation to learn more or try the [Working in WSL](/docs/remote/wsl-tutorial.md) introductory tutorial. See the [Developing in WSL](/docs/remote/wsl.md) documentation to learn more or try the [Working in WSL](/docs/remote/wsl-tutorial.md) introductory tutorial.

Просмотреть файл

@ -76,9 +76,9 @@ As more and more teams in Microsoft contribute extensions, we realize that it ca
| [Pyright](https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright) | ✔ | [MIT](https://raw.githubusercontent.com/microsoft/pyright/master/LICENSE.txt) | | [Pyright](https://marketplace.visualstudio.com/items?itemName=ms-pyright.pyright) | ✔ | [MIT](https://raw.githubusercontent.com/microsoft/pyright/master/LICENSE.txt) |
| [Python](https://marketplace.visualstudio.com/items/ms-python.python) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-python.python/license) | | [Python](https://marketplace.visualstudio.com/items/ms-python.python) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-python.python/license) |
| [React Native Tools](https://marketplace.visualstudio.com/items/msjsdiag.vscode-react-native) | ✔ ([Repo](https://github.com/microsoft/vscode-react-native)) | [Microsoft](https://marketplace.visualstudio.com/items/msjsdiag.vscode-react-native/license) | | [React Native Tools](https://marketplace.visualstudio.com/items/msjsdiag.vscode-react-native) | ✔ ([Repo](https://github.com/microsoft/vscode-react-native)) | [Microsoft](https://marketplace.visualstudio.com/items/msjsdiag.vscode-react-native/license) |
| [Remote - Containers](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers/license) | | [Dev Containers](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-containers/license) |
| [Remote - SSH](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh/license) | | [Remote - SSH](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-ssh/license) |
| [Remote - WSL](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl/license) | | [WSL](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl) | | [Microsoft](https://marketplace.visualstudio.com/items/ms-vscode-remote.remote-wsl/license) |
| [Reference Search View](https://marketplace.visualstudio.com/items/ms-vscode.references-view) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-vscode.references-view/license) | | [Reference Search View](https://marketplace.visualstudio.com/items/ms-vscode.references-view) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-vscode.references-view/license) |
| [Resharper 9 Keybindings](https://marketplace.visualstudio.com/items/ms-vscode.resharper9-keybindings) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-vscode.resharper9-keybindings/license)| | [Resharper 9 Keybindings](https://marketplace.visualstudio.com/items/ms-vscode.resharper9-keybindings) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-vscode.resharper9-keybindings/license)|
| [Service Fabric Reliable Services](https://marketplace.visualstudio.com/items/ms-azuretools.vscode-service-fabric-reliable-services) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-azuretools.vscode-service-fabric-reliable-services/license) | | [Service Fabric Reliable Services](https://marketplace.visualstudio.com/items/ms-azuretools.vscode-service-fabric-reliable-services) | ✔ | [MIT](https://marketplace.visualstudio.com/items/ms-azuretools.vscode-service-fabric-reliable-services/license) |

Просмотреть файл

@ -31,7 +31,7 @@ VS Code is supported on the following platforms:
* VS Code does not support application virtualization solutions such as Microsoft App-V or MSIX for Windows, or third-party app virtualization technologies. * VS Code does not support application virtualization solutions such as Microsoft App-V or MSIX for Windows, or third-party app virtualization technologies.
* Running VS Code in a virtual machine environment requires a full operating system. * Running VS Code in a virtual machine environment requires a full operating system.
* VS Code does not support multiple simultaneous users using the software on the same machine, including shared virtual desktop infrastructure machines or a pooled Windows/Linux Virtual Desktop host pool. * VS Code does not support multiple simultaneous users using the software on the same machine, including shared virtual desktop infrastructure machines or a pooled Windows/Linux Virtual Desktop host pool.
* Running the full VS Code in Windows/Linux containers is not supported but running with the [Remote - Containers](/docs/remote/containers.md) extension is supported. When using the Remote - Containers extension, the VS Code server is running in the container while the VS Code client is on the desktop. * Running the full VS Code in Windows/Linux containers is not supported but running with the [Dev Containers](/docs/remote/containers.md) extension is supported. When using the Dev Containers extension, the VS Code server is running in the container while the VS Code client is on the desktop.
### Additional Linux requirements ### Additional Linux requirements

Просмотреть файл

@ -27,15 +27,15 @@ In the diagram below, you'll see an example of three dev containers: one for Pyt
### Prerequisites ### Prerequisites
To get started with using dev containers in VS Code, you'll need to download the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) from the Extension Marketplace. To get started with using dev containers in VS Code, you'll need to download the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension from the VS Code Marketplace.
![Remote Containers extension](images/containers/remote-containers.png) ![Dev Containers extension](images/containers/remote-containers.png) <!-- TBD update screenshot -->
You'll also need to download [Docker](https://docs.docker.com/docker-for-windows/install-windows-home/), which is the industry standard for building and sharing containers. You'll also need to download [Docker](https://docs.docker.com/docker-for-windows/install-windows-home/), which is the industry standard for building and sharing containers.
### Sample dev containers ### Sample dev containers
Rather than creating dev containers from scratch, Remote - Containers has several ways to help you [create dev containers](/docs/remote/create-dev-container.md) or access existing dev containers. Rather than creating dev containers from scratch, Dev Containers has several ways to help you [create dev containers](/docs/remote/create-dev-container.md) or access existing dev containers.
Below is a list of sample dev containers we'd recommend starting out with: Below is a list of sample dev containers we'd recommend starting out with:
@ -50,7 +50,7 @@ Below is a list of sample dev containers we'd recommend starting out with:
## Learning resources ## Learning resources
To learn how to get started with the Remote - Containers extension, check out this 5-minute introductory video: To learn how to get started with the Dev Containers extension, check out this 5-minute introductory video:
<iframe src="https://youtube.com/embed/Uvf2FVS1F8k?rel=0&amp;disablekb=0&amp;modestbranding=1&amp;showinfo=0" frameborder="0" allowfullscreen title="Development Containers: A Guide for Students"></iframe> <iframe src="https://youtube.com/embed/Uvf2FVS1F8k?rel=0&amp;disablekb=0&amp;modestbranding=1&amp;showinfo=0" frameborder="0" allowfullscreen title="Development Containers: A Guide for Students"></iframe>

Просмотреть файл

@ -36,7 +36,7 @@ To get started with remote development in VS Code, you can download the [Remote
This extension pack includes three extensions (which can also be downloaded individually): This extension pack includes three extensions (which can also be downloaded individually):
- [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) - Connect to any location by opening folders on a remote computer or virtual machine (VM) using SSH. - [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) - Connect to any location by opening folders on a remote computer or virtual machine (VM) using SSH.
- [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) - Develop within a container, which is a piece of software that includes your app and any dependencies your app needs to run. - [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) - Develop within a container, which is a piece of software that includes your app and any dependencies your app needs to run.
- [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) - Get a Linux-powered development experience while on Windows using the Windows Subsystem for Linux (WSL). - [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) - Get a Linux-powered development experience while on Windows using the Windows Subsystem for Linux (WSL).
Check out the topics in this section to learn more about each of the remote development extensions in Visual Studio Code. Check out the topics in this section to learn more about each of the remote development extensions in Visual Studio Code.

Просмотреть файл

@ -17,19 +17,19 @@ WSL especially helps web developers and those working with Bash and Linux-first
## Get started with WSL in VS Code ## Get started with WSL in VS Code
To get started with using WSL in VS Code, you'll need to download the [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) from the Extension Marketplace. To get started with using WSL in VS Code, you'll need to download the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) from the Extension Marketplace.
![Remote WSL extension](images/wsl/remote-wsl.png) ![WSL extension](images/wsl/remote-wsl.png) <!-- TBD new screenshot -->
You'll also need WSL and a Linux distribution installed. We recommend using WSL 2, which is the newest version of WSL, as you will benefit from significant [performance advantages](https://learn.microsoft.com/windows/wsl/compare-versions) over WSL 1. You'll also need WSL and a Linux distribution installed. We recommend using WSL 2, which is the newest version of WSL, as you will benefit from significant [performance advantages](https://learn.microsoft.com/windows/wsl/compare-versions) over WSL 1.
Check out Remote - WSL in action: Check out the WSL extension in action:
<img src="https://github.com/microsoft/vscode-remote-release/blob/main/docs/images/remote-wsl-open-code.gif?raw=true" alt="Using Remote - WSL with an Ubuntu distro on WSL" aria-hidden="true" class="thumb"/> <img src="https://github.com/microsoft/vscode-remote-release/blob/main/docs/images/remote-wsl-open-code.gif?raw=true" alt="Using the WSL extension with an Ubuntu distro on WSL" aria-hidden="true" class="thumb"/>
The typical flow is you'll open a Linux command prompt, navigate to a folder of your choosing, and type `code .` to launch a new instance of VS Code connected to WSL. From there, you get the full experience of using VS Code as if you were developing on Linux, except you're on a Windows machine! The typical flow is you'll open a Linux command prompt, navigate to a folder of your choosing, and type `code .` to launch a new instance of VS Code connected to WSL. From there, you get the full experience of using VS Code as if you were developing on Linux, except you're on a Windows machine!
<iframe src="https://youtube.com/embed/mIHprjsSO9o?rel=0&amp;disablekb=0&amp;modestbranding=1&amp;showinfo=0" frameborder="0" allowfullscreen title="Visual Studio Code Remote - WSL"></iframe> <iframe src="https://youtube.com/embed/mIHprjsSO9o?rel=0&amp;disablekb=0&amp;modestbranding=1&amp;showinfo=0" frameborder="0" allowfullscreen title="Visual Studio Code WSL"></iframe>
## Next steps ## Next steps

Просмотреть файл

@ -262,8 +262,8 @@ The VS Code Remote Development extensions are still in preview but there is exte
There are specific topics for each Remote Development extension: There are specific topics for each Remote Development extension:
* [Remote - SSH](https://code.visualstudio.com/docs/remote/ssh) - Connect to any location by opening folders on a remote machine/VM using SSH. * [Remote - SSH](https://code.visualstudio.com/docs/remote/ssh) - Connect to any location by opening folders on a remote machine/VM using SSH.
* [Remote - Containers](https://code.visualstudio.com/docs/remote/containers) - Work with a sandboxed toolchain or container-based application inside (or mounted into) a container. * [Dev Containers](https://code.visualstudio.com/docs/remote/containers) - Work with a sandboxed toolchain or container-based application inside (or mounted into) a container.
* [Remote - WSL](https://code.visualstudio.com/docs/remote/wsl) - Get a Linux-powered development experience in the Windows Subsystem for Linux. * [WSL](https://code.visualstudio.com/docs/remote/wsl) - Get a Linux-powered development experience in the Windows Subsystem for Linux.
Under the [Remote](https://code.visualstudio.com/docs/remote) table of contents, you will also find a [Tips and Tricks](https://code.visualstudio.com/docs/remote/troubleshooting) guide as well as [FAQ](https://code.visualstudio.com/docs/remote/faq). Under the [Remote](https://code.visualstudio.com/docs/remote) table of contents, you will also find a [Tips and Tricks](https://code.visualstudio.com/docs/remote/troubleshooting) guide as well as [FAQ](https://code.visualstudio.com/docs/remote/faq).

Просмотреть файл

@ -186,15 +186,15 @@ A new setting, `debug.console.wordWrap`, controls whether word wrap is enabled i
### Node.js debug configuration attribute useWSL is deprecated ### Node.js debug configuration attribute useWSL is deprecated
With the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, universal [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl) (WSL) support has arrived in VS Code. Now all extensions can be used in WSL in a seamless way. With the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension, universal [Windows Subsystem for Linux](https://learn.microsoft.com/windows/wsl) (WSL) support has arrived in VS Code. Now all extensions can be used in WSL in a seamless way.
Consequently, we are planning to remove the now obsolete WSL support we added to VS Code's Node.js debugger two years ago. As a first step toward this goal, we are deprecating the `useWSL` debug configuration attribute. Starting with this milestone, the attribute will show up with a squiggly when opening a `launch.json` file in the editor. In addition, a notification appears when a debug session is launched that contains a `useWSL`. Consequently, we are planning to remove the now obsolete WSL support we added to VS Code's Node.js debugger two years ago. As a first step toward this goal, we are deprecating the `useWSL` debug configuration attribute. Starting with this milestone, the attribute will show up with a squiggly when opening a `launch.json` file in the editor. In addition, a notification appears when a debug session is launched that contains a `useWSL`.
Here are the steps for migrating an existing project that uses the `useWSL` flag to debugging with the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension: Here are the steps for migrating an existing project that uses the `useWSL` flag to debugging with the [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension:
* Make sure that you have the Remote-WSL extension installed. * Make sure that you have the WSL extension installed.
* Open the folder of your project in VS Code. * Open the folder of your project in VS Code.
* Reopen the project in WSL by using the **Remote-WSL: Reopen folder in WSL** command. * Reopen the project in WSL by using the **WSL: Reopen Folder in WSL** command.
* Press `kb(workbench.action.debug.start)`. * Press `kb(workbench.action.debug.start)`.
* Remove the `useWSL` flag from the debug configuration. * Remove the `useWSL` flag from the debug configuration.

Просмотреть файл

@ -26,7 +26,7 @@ Welcome to the August 2019 release of Visual Studio Code. There are a number of
* **[Add missing await Quick Fix](#add-missing-await-quick-fix)** - Find overlooked awaits in asynchronous code. * **[Add missing await Quick Fix](#add-missing-await-quick-fix)** - Find overlooked awaits in asynchronous code.
* **[Debugging data breakpoints](#breaking-when-value-changes-data-breakpoints)** - Debugger breaks when tracked values change. * **[Debugging data breakpoints](#breaking-when-value-changes-data-breakpoints)** - Debugger breaks when tracked values change.
* **[VS Code icon repository](#vs-code-icon-repository)** - Official product icons available for extension authors. * **[VS Code icon repository](#vs-code-icon-repository)** - Official product icons available for extension authors.
* **[Alpine Linux distro support](#remote-development-preview)** - Both for the Remote WSL and Containers extensions. * **[Alpine Linux distro support](#remote-development-preview)** - Both for the WSL and Dev Containers extensions.
>If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com). >If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com).
@ -319,7 +319,7 @@ Feature highlights in 1.38 include:
* VS Code Stable preview support for Alpine Linux Containers, Alpine WSL distributions, and ARMv7l / AArch32 SSH hosts. * VS Code Stable preview support for Alpine Linux Containers, Alpine WSL distributions, and ARMv7l / AArch32 SSH hosts.
* VS Code Insiders experimental support for ARMv8l / AArch64 SSH hosts. * VS Code Insiders experimental support for ARMv8l / AArch64 SSH hosts.
* Improvements to Remote - Containers including a new container explorer! * Improvements to Dev Containers including a new container explorer!
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_38.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_38.md).

Просмотреть файл

@ -244,7 +244,7 @@ Work has continued on the [Remote Development extensions](https://marketplace.vi
Feature highlights in 1.39 include: Feature highlights in 1.39 include:
* Remote Explorer now supports the Remote - WSL extension and lets you easily connect to installed Linux distros. * Remote Explorer now supports the WSL extension and lets you easily connect to installed Linux distros.
* New **Open Repository in Container** command so you can work on source code repositories in isolation. * New **Open Repository in Container** command so you can work on source code repositories in isolation.
* Experimental support for SSH connection sharing and using SSH to connect to Windows remote machines. * Experimental support for SSH connection sharing and using SSH to connect to Windows remote machines.

Просмотреть файл

@ -26,7 +26,7 @@ Welcome to the November 2019 release of Visual Studio Code. There are a number o
* **[HTML mirror cursor in tags](#html-mirror-cursor)** - Automatic multi-cursor in matching HTML tags. * **[HTML mirror cursor in tags](#html-mirror-cursor)** - Automatic multi-cursor in matching HTML tags.
* **[Optional chaining in JS/TS](#optional-chaining-support-for-javascript-and-typescript)** - Use the `?.` operator to simplify working with nested structures. * **[Optional chaining in JS/TS](#optional-chaining-support-for-javascript-and-typescript)** - Use the `?.` operator to simplify working with nested structures.
* **[Extract interface refactoring](#extract-interface-refactoring-for-typescript)** - Quickly extract an inline type to a TypeScript interface. * **[Extract interface refactoring](#extract-interface-refactoring-for-typescript)** - Quickly extract an inline type to a TypeScript interface.
* **[Remote - Containers extension](#remote-development)** - Better support for opening repositories in Docker containers. * **[Dev Containers extension](#remote-development)** - Better support for opening repositories in Docker containers.
>If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com). >If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com).
@ -496,9 +496,9 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.41 include: Feature highlights in 1.41 include:
* Remote - Containers: Easier to try out sample repositories (for example [vscode-remote-try-python](https://github.com/microsoft/vscode-remote-try-python)) in a container. * Dev Containers: Easier to try out sample repositories (for example [vscode-remote-try-python](https://github.com/microsoft/vscode-remote-try-python)) in a container.
* Remote - Containers: Improved performance when creating a container and new options for `devcontainer.json`. * Dev Containers: Improved performance when creating a container and new options for `devcontainer.json`.
* Remote - WSL: Support on Windows 10 ARM-based PCs such as Surface Pro X. * WSL: Support on Windows 10 ARM-based PCs such as Surface Pro X.
* Remote Explorer can now scope available views to specific remote types. * Remote Explorer can now scope available views to specific remote types.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_41.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_41.md).

Просмотреть файл

@ -480,8 +480,8 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.42 include: Feature highlights in 1.42 include:
* Remote - SSH: Improved support for Windows servers, including automatic OS detection. * Remote - SSH: Improved support for Windows servers, including automatic OS detection.
* Remote - WSL: Support for **Reveal in Explorer** to open the Windows Explorer for WSL resources. * WSL: Support for **Reveal in Explorer** to open the Windows Explorer for WSL resources.
* Remote - Containers: Pre-built container images, which include dependencies such as Git and zsh. * Dev Containers: Pre-built container images, which include dependencies such as Git and zsh.
* Forwarded Ports view: Map, view, and reuse SSH and container ports. * Forwarded Ports view: Map, view, and reuse SSH and container ports.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_42.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_42.md).

Просмотреть файл

@ -471,7 +471,7 @@ Feature highlights in 1.43 include:
* Open remote workspaces via application links. * Open remote workspaces via application links.
* Remote - SSH: Support for Windows and macOS SSH hosts. * Remote - SSH: Support for Windows and macOS SSH hosts.
* Remote - SSH: Connection sharing on by default. * Remote - SSH: Connection sharing on by default.
* Remote - WSL: Check out the recent [Using Docker in WSL 2](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2) blog post. * WSL: Check out the recent [Using Docker in WSL 2](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2) blog post.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_43.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_43.md).

Просмотреть файл

@ -401,9 +401,9 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.44 include: Feature highlights in 1.44 include:
* Remote - Containers: Check out a PR directly into a container. * Dev Containers: Check out a PR directly into a container.
* Remote - Containers: Kubernetes container attach support. * Dev Containers: Kubernetes container attach support.
* Remote - Containers: Experimental WSL 2 Docker engine support. * Dev Containers: Experimental WSL 2 Docker engine support.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_44.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_44.md).

Просмотреть файл

@ -337,9 +337,9 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.45 include: Feature highlights in 1.45 include:
* Remote - Containers: Provide container configuration recommendations. * Dev Containers: Provide container configuration recommendations.
* Remote - Containers: WSL 2 Docker and Podman engines support. * Dev Containers: WSL 2 Docker and Podman engines support.
* Remote - Containers: New `devcontainer.json` variables for local and container folders. * Dev Containers: New `devcontainer.json` variables for local and container folders.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_45.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_45.md).

Просмотреть файл

@ -455,9 +455,9 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
New features in 1.46 include: New features in 1.46 include:
* Remote - Containers: Support for GPG forwarding. * Dev Containers: Support for GPG forwarding.
* Remote - Containers: Support for inspecting a Docker volume. * Dev Containers: Support for inspecting a Docker volume.
* Remote - Containers: New `devcontainer.json` command properties. * Dev Containers: New `devcontainer.json` command properties.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_46.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_46.md).

Просмотреть файл

@ -340,8 +340,8 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.47 include: Feature highlights in 1.47 include:
* Remote - SSH: Remote server can listen on a socket instead of a port. * Remote - SSH: Remote server can listen on a socket instead of a port.
* Remote - Containers: Prompt to open repository in a volume. * Dev Containers: Prompt to open repository in a volume.
* Remote - Containers and WSL: Check out the recent [Using Remote Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl) blog post. * Dev Containers and WSL: Check out the recent [Using Dev Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl) blog post.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_47.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_47.md).

Просмотреть файл

@ -25,7 +25,7 @@ Welcome to the July 2020 release of Visual Studio Code. There are a number of up
* **[Updated in-browser debugging](#debug-open-link-command)** - Debug in the browser without writing a launch configuration. * **[Updated in-browser debugging](#debug-open-link-command)** - Debug in the browser without writing a launch configuration.
* **[Publish a public repository](#github-publish-to-a-public-repository)** - Choose whether to publish to a public or private GitHub repository. * **[Publish a public repository](#github-publish-to-a-public-repository)** - Choose whether to publish to a public or private GitHub repository.
* **[Notebook UX updates](#notebooks)** - New Cell menu, enhanced drag and drop. * **[Notebook UX updates](#notebooks)** - New Cell menu, enhanced drag and drop.
* **[New Remote Container topics](#new-remote-container-topics)** - Learn how to attach to a container and create a new dev container. * **[New Dev Container topics](#new-dev-container-topics)** - Learn how to attach to a container and create a new dev container.
* **[Java lightweight mode](#java-lightweight-mode)** - Start working with your Java source files more quickly. * **[Java lightweight mode](#java-lightweight-mode)** - Start working with your Java source files more quickly.
>If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com). >If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com).
@ -193,7 +193,7 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.48 include: Feature highlights in 1.48 include:
* Remote - Containers: Pull environment variables from login and shell scripts. * Dev Containers: Pull environment variables from login and shell scripts.
* Remote - SSH: Fewer prompts when starting or maintaining an SSH connection. * Remote - SSH: Fewer prompts when starting or maintaining an SSH connection.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_48.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_48.md).
@ -289,7 +289,7 @@ VS Code uses the function `vscode.debug.startDebugging` for starting debug sessi
## Documentation and extensions ## Documentation and extensions
### New Remote Container topics ### New Dev Container topics
There are new topics for working with Containers in VS Code: There are new topics for working with Containers in VS Code:

Просмотреть файл

@ -278,7 +278,7 @@ Feature highlights in 1.49 include:
* Automatic port forwarding: Ports detected in terminal output are automatically forwarded to the client. * Automatic port forwarding: Ports detected in terminal output are automatically forwarded to the client.
* Welcome views: All Remote extensions include a new Welcome experience to help you get started. * Welcome views: All Remote extensions include a new Welcome experience to help you get started.
* Remote - Containers: You can now directly clone a repository from GitHub into a container volume. * Dev Containers: You can now directly clone a repository from GitHub into a container volume.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_49.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_49.md).

Просмотреть файл

@ -588,7 +588,7 @@ We have finished the work to make VS Code trusted types compliant per the [W3C T
### Remote Development ### Remote Development
Check out our new [Beginner's Series to: Dev Containers](https://channel9.msdn.com/Series/Beginners-Series-to-Dev-Containers?WT.mc_id=devcloud-11496-cxa), a set of eight videos that show you how to get, create, and configure a container-based development environment using VS Code [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Check out our new [Beginner's Series to: Dev Containers](https://channel9.msdn.com/Series/Beginners-Series-to-Dev-Containers?WT.mc_id=devcloud-11496-cxa), a set of eight videos that show you how to get, create, and configure a container-based development environment using VS Code [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
![Beginner's dev containers videos series](images/1_53/containers-series.png) ![Beginner's dev containers videos series](images/1_53/containers-series.png)

Просмотреть файл

@ -90,7 +90,7 @@ Thanks to the [new terminal process layout](#new-terminal-process-layout), frequ
Recently a new feature was rolled out that enabled extensions to influence the terminal's environment. This is used by various language extensions and the built-in git extension to enable VS Code as a git auth provided to negate the need to sign in. Previously the UX for this was to present a subtle ⚠️ icon in the top-right corner to indicate that a terminal's environment was stale. The indicator was subtle, since environment changes may or not be important. Recently a new feature was rolled out that enabled extensions to influence the terminal's environment. This is used by various language extensions and the built-in git extension to enable VS Code as a git auth provided to negate the need to sign in. Previously the UX for this was to present a subtle ⚠️ icon in the top-right corner to indicate that a terminal's environment was stale. The indicator was subtle, since environment changes may or not be important.
We've tweaked this to automatically relaunch terminals that have stale environments when they have not yet been interacted with. This may result in some flickering, but extension terminal integration is much more seamless now. For example, the first terminal in a Remote - WSL window should no longer show a Git auth error, provided the relaunch happened before typing in the terminal. We've tweaked this to automatically relaunch terminals that have stale environments when they have not yet been interacted with. This may result in some flickering, but extension terminal integration is much more seamless now. For example, the first terminal in a WSL window should no longer show a Git auth error, provided the relaunch happened before typing in the terminal.
## Workbench ## Workbench
@ -345,7 +345,7 @@ Feature highlights in 1.54 include:
* Ports view table layout * Ports view table layout
* Remote - SSH: X11 Forwarding * Remote - SSH: X11 Forwarding
* Remote - WSL: Improved WSL 2 support * WSL: Improved WSL 2 support
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_54.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_54.md).

Просмотреть файл

@ -23,7 +23,7 @@ Welcome to the April 2021 release of Visual Studio Code. The VS Code team has be
* **[Terminal profile improvements](#terminal)** - Create a custom default terminal profile. * **[Terminal profile improvements](#terminal)** - Create a custom default terminal profile.
* **[Debugger inline values](#inline-values-by-default-for-some-languages)** - Display variable values inline during debugging sessions. * **[Debugger inline values](#inline-values-by-default-for-some-languages)** - Display variable values inline during debugging sessions.
* **[Notebook KaTeX support](#math-support-in-markdown-cells)** - Math support in notebook Markdown cells. * **[Notebook KaTeX support](#math-support-in-markdown-cells)** - Math support in notebook Markdown cells.
* **[Remote - Containers volumes view](#remote-development)** - Manage mounted volumes within Docker containers. * **[Dev Containers volumes view](#remote-development)** - Manage mounted volumes within Docker containers.
* **[winget installation](#windows-installers-consolidated-in-windows-package-manager)** - VS Code is available via the Windows Package Manager. * **[winget installation](#windows-installers-consolidated-in-windows-package-manager)** - VS Code is available via the Windows Package Manager.
* **[New introductory videos](#documentation)** - Videos for getting started with VS Code as well as working with C++. * **[New introductory videos](#documentation)** - Videos for getting started with VS Code as well as working with C++.
* **[Terminal tabs preview](#terminal-tabs)** - Get a first look at managing open terminals with the new tabs view. * **[Terminal tabs preview](#terminal-tabs)** - Get a first look at managing open terminals with the new tabs view.
@ -351,7 +351,7 @@ Once you enter a URL or choose a repository or pull request, VS Code will open a
* Easily edit and contribute to any GitHub repository - directly commit your changes to GitHub, or open a pull request. * Easily edit and contribute to any GitHub repository - directly commit your changes to GitHub, or open a pull request.
* Continue in another environment - via the **Continue on...** command (accessible from the Command Palette or the remote indicator quick pick menu). * Continue in another environment - via the **Continue on...** command (accessible from the Command Palette or the remote indicator quick pick menu).
* Clone the repository locally * Clone the repository locally
* Clone the repository into a container - requires the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension * Clone the repository into a container - requires the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension
* Provides a familiar user interface similar to working on a local repository (*see "Limitations" below). * Provides a familiar user interface similar to working on a local repository (*see "Limitations" below).
* **Explorer** - Open, copy, move, rename, and delete files and folders * **Explorer** - Open, copy, move, rename, and delete files and folders
* **Search** - Fast full-text search<sup>*</sup> * **Search** - Fast full-text search<sup>*</sup>

Просмотреть файл

@ -486,7 +486,7 @@ Feature highlights in 1.57 include:
* Control desired protocol for forwarded ports. * Control desired protocol for forwarded ports.
* Optional watch for forwarded port collision. * Optional watch for forwarded port collision.
* Remote - Containers supports Workspace Trust security feature. * Dev Containers supports Workspace Trust security feature.
* Better environment variable detection in dev containers. * Better environment variable detection in dev containers.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_57.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_57.md).

Просмотреть файл

@ -216,7 +216,7 @@ Feature highlights in 1.58 include:
* Option to only open a browser once for forwarded ports. * Option to only open a browser once for forwarded ports.
* `devcontainer.json` support for cached images. * `devcontainer.json` support for cached images.
* Remote-Containers now checks "hostRequirements". * Dev Containers now checks "hostRequirements".
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_58.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_58.md).

Просмотреть файл

@ -28,7 +28,7 @@ Welcome to the July 2021 release of Visual Studio Code. There are many updates i
* **[Testing API finalized](#testing-apis)** - Native support for running tests in VS Code with built-in Test Explorer. * **[Testing API finalized](#testing-apis)** - Native support for running tests in VS Code with built-in Test Explorer.
* **[Debug Disassembly view preview](#disassembly-view)** - Display disassembled C++ code in VS Code. * **[Debug Disassembly view preview](#disassembly-view)** - Display disassembled C++ code in VS Code.
* **[Live Preview extension](#live-preview)** - Live HTML preview within VS Code with JavaScript debugging support. * **[Live Preview extension](#live-preview)** - Live HTML preview within VS Code with JavaScript debugging support.
* **[Remote - Containers devcontainer CLI](#remote-containers-devcontainer-cli)** - Command line interface for working with development containers. * **[Dev Containers devcontainer CLI](#dev-containers-devcontainer-cli)** - Command line interface for working with development containers.
>If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com). >If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com).
@ -291,9 +291,9 @@ In the [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.py
![List of Python interpreters](images/1_59/python-interpreters-list.png) ![List of Python interpreters](images/1_59/python-interpreters-list.png)
### Remote Containers devcontainer CLI ### Dev Containers devcontainer CLI
The [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension, for working with Docker containers from within VS Code, now includes a `devcontainer` command line interface to let you open a folder within a dev container (`devcontainer open`) or build a dev container image (`devcontainer build`). The [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension, for working with Docker containers from within VS Code, now includes a `devcontainer` command line interface to let you open a folder within a dev container (`devcontainer open`) or build a dev container image (`devcontainer build`).
You can learn about new Remote Development extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_59.md). You can learn about new Remote Development extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_59.md).

Просмотреть файл

@ -343,7 +343,7 @@ Feature highlights in 1.61 include:
* DNS names in forwarded ports. * DNS names in forwarded ports.
* Easy container additional feature selection. * Easy container additional feature selection.
* Remote - Containers extension can execute CLI commands in WSL. * Dev Containers extension can execute CLI commands in WSL.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_61.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_61.md).
@ -533,9 +533,7 @@ You should not notice any difference in your day to day work, but if file watchi
### Advanced container configuration ### Advanced container configuration
There is a new section covering the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension's [advanced container configuration](https://code.visualstudio.com/remote/advancedcontainers/overview). There is a new section covering the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension's [advanced container configuration](https://code.visualstudio.com/remote/advancedcontainers/overview).
![Remote - Containers extension](images/1_61/remote-containers-extension.png)
In the container documentation, you can learn how to: In the container documentation, you can learn how to:

Просмотреть файл

@ -439,7 +439,7 @@ Work continues on the [Remote Development extensions](https://marketplace.visual
Feature highlights in 1.66 include: Feature highlights in 1.66 include:
* "Open in Remote Container" badge - Direct users of your repo to reopen in a custom development container. * "Open in Dev Container" badge - Direct users of your repo to reopen in a custom development container.
* The Remote - SSH extension can now connect to remote Apple Silicon/M1/ARM64 machines. * The Remote - SSH extension can now connect to remote Apple Silicon/M1/ARM64 machines.
You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_66.md). You can learn about new extension features and bug fixes in the [Remote Development release notes](https://github.com/microsoft/vscode-docs/blob/main/remote-release-notes/v1_66.md).

Просмотреть файл

@ -374,7 +374,7 @@ When you are using desktop VS Code with the [Remote Repositories](https://market
* A cloud hosted environment in GitHub Codespaces (available via the [GitHub Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension) * A cloud hosted environment in GitHub Codespaces (available via the [GitHub Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension)
* A new local clone of your GitHub repository * A new local clone of your GitHub repository
* A new clone of your GitHub repository in a container volume (available via the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension) * A new clone of your GitHub repository in a container volume (available via the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension)
* [https://vscode.dev](https://vscode.dev) * [https://vscode.dev](https://vscode.dev)
* An existing local folder containing a clone of your repository * An existing local folder containing a clone of your repository

Просмотреть файл

@ -55,15 +55,15 @@ Support for Alpine Linux is available in VS Code [Insiders](https://code.visuals
The default shell and the home folder are now read from `/etc/passwd`. You can still set the `SHELL` or `HOME` environment variables to override. The default shell and the home folder are now read from `/etc/passwd`. You can still set the `SHELL` or `HOME` environment variables to override.
### Remote-Containers: Show Log ### Dev Containers: Show Container Log
The **Remote-Containers: Show Log** command reveals the log of the Remote Container. The **Dev Containers: Show Container Log** command reveals the log of the Dev Container.
## WSL ## WSL
### Select Linux distro ### Select Linux distro
Until now, the Remote - WSL extension was limited to use the default distribution as configured by `wslconfig.exe`. You can now open a Remote WSL window with any distro. The new **Remote WSL: New Window using Distro...** command lets you select from the list of installed distros. Until now, the WSL extension was limited to use the default distribution as configured by `wslconfig.exe`. You can now open a WSL window with any distro. The new **WSL: New Window using Distro...** command lets you select from the list of installed distros.
![Select WSL distro](images/1_36/select-distro.png) ![Select WSL distro](images/1_36/select-distro.png)
@ -71,16 +71,16 @@ Alternatively you can start by opening a shell of the WSL distro and open the VS
![WSL with distro on status bar](images/1_36/wsl-with-distro.png) ![WSL with distro on status bar](images/1_36/wsl-with-distro.png)
To install new distros, go to the Windows Store and search for 'WSL'. You will find a selection of Linux distros, such as Ubuntu, Fedora, OpenSuse that can all be installed in parallel. Note: Alpine WSL is not yet supported by the Remote - WSL extension. To install new distros, go to the Windows Store and search for 'WSL'. You will find a selection of Linux distros, such as Ubuntu, Fedora, OpenSuse that can all be installed in parallel. Note: Alpine WSL is not yet supported by the WSL extension.
The Remote - WSL extension requires WSL from Windows 10, May 2019 Update (version 1903) for this feature to work. The WSL extension requires WSL from Windows 10, May 2019 Update (version 1903) for this feature to work.
### Reopen Folder in WSL and Reopen Folder in Windows ### Reopen Folder in WSL and Reopen Folder in Windows
There are new commands that let you easily switch from Windows to WSL and back. There are new commands that let you easily switch from Windows to WSL and back.
* When in a local folder or workspace, **Reopen Folder in WSL** reopens the input in WSL. If you have multiple distros installed, a picker will let you select the distro to use. * When in a local folder or workspace, **Reopen Folder in WSL** reopens the input in WSL. If you have multiple distros installed, a picker will let you select the distro to use.
* In a Remote WSL window, **Reopen Folder in Windows** reopens the current folder or workspace in Windows. * In a WSL window, **Reopen Folder in Windows** reopens the current folder or workspace in Windows.
![Reopen folder in WSL command](images/1_36/reopen-in-wsl.png) ![Reopen folder in WSL command](images/1_36/reopen-in-wsl.png)

Просмотреть файл

@ -26,19 +26,19 @@ The Remote settings file now supports edit actions.
### Experimental Alpine Linux support ### Experimental Alpine Linux support
The Remote - WSL extension now supports the Alpine WSL distribution on VS Code Insiders. The WSL extension now supports the Alpine WSL distribution on VS Code Insiders.
To use an Alpine distro: To use an Alpine distro:
- You need to be on Windows 10, May 2019 Update (1903). - You need to be on Windows 10, May 2019 Update (1903).
- Install **Alpine WSL** from the Microsoft Store. - Install **Alpine WSL** from the Microsoft Store.
- Install the latest Remote - WSL extension in a [VS Code Insiders](https://code.visualstudio.com/insiders/) build. - Install the latest WSL extension in a [VS Code Insiders](https://code.visualstudio.com/insiders/) build.
- The Remote - WSL extension will prompt you to install `libstdc++` inside Alpine. To do that, open an Alpine WSL shell and run `su -c 'apk update && apk add libstdc++'`. - The WSL extension will prompt you to install `libstdc++` inside Alpine. To do that, open an Alpine WSL shell and run `su -c 'apk update && apk add libstdc++'`.
To bring up the Remote - WSL window (instance) either: To bring up the WSL window (instance) either:
- Run `code-insiders .` from the WSL shell. - Run `code-insiders .` from the WSL shell.
- Invoke the **Remote-WSL: New Window using Distro** command and pick **Alpine**. - Invoke the **WSL: New Window using Distro** command and pick **Alpine**.
![Running the Alpine distribution](images/1_37/alpine.png) ![Running the Alpine distribution](images/1_37/alpine.png)

Просмотреть файл

@ -26,7 +26,7 @@ Notice how when the link to `http://127.0.0.1:8080` is clicked, we open the loca
### Remote Explorer ### Remote Explorer
The Remote - WSL extension has joined Containers and SSH in the Remote Explorer. You can see all your installed Linux distributions, connect to a specific distro, set your default distro, and see the folders you've opened on a Linux distro in the Remote Explorer. The WSL extension has joined Containers and SSH in the Remote Explorer. You can see all your installed Linux distributions, connect to a specific distro, set your default distro, and see the folders you've opened on a Linux distro in the Remote Explorer.
![WSL Remote Explorer](images/1_39/wsl-remote-explorer.png) ![WSL Remote Explorer](images/1_39/wsl-remote-explorer.png)
@ -36,7 +36,7 @@ You can now make changes to the environment where the VS Code Remote is started
The script needs to be a valid Bourne shell (sh) script. Be aware that an invalid script will prevent the server from starting up. The script needs to be a valid Bourne shell (sh) script. Be aware that an invalid script will prevent the server from starting up.
Check the WSL log (**Remote WSL: Open WSL Log**) for output and errors. Check the WSL log (**WSL: Show Log**) for output and errors.
## Containers ## Containers
@ -44,7 +44,7 @@ Check the WSL log (**Remote WSL: Open WSL Log**) for output and errors.
When attaching to a container, we now save the last workspace folder, the installed extensions, and the dynamically forwarded ports. The next time you attach to the same container or a container of the same image (and tag), this configuration will be reapplied. When attaching to a container, we now save the last workspace folder, the installed extensions, and the dynamically forwarded ports. The next time you attach to the same container or a container of the same image (and tag), this configuration will be reapplied.
The **Remote-Containers: Open Container Configuration File** command will open the current configuration while being attached to a container and the **Remote-Containers: Open Attached Container Configuration File...** command will show a list of all configurations. The **Dev Containers: Open Container Configuration File** command will open the current configuration while being attached to a container and the **Dev Containers: Open Attached Container Configuration File...** command will show a list of all configurations.
```json ```json
{ {
@ -60,11 +60,11 @@ The **Remote-Containers: Open Container Configuration File** command will open t
### Open repository in a container ### Open repository in a container
There is a new command **Remote-Containers: Open Repository in Container...** to allow you to work on a repository in a container without locally cloning it first. This lets you work with an isolated copy of a repository, useful for a PR review or to investigate another branch, without impacting what you have currently checked out. The command requires that the repository has a `devcontainer.json` file and, in the current version, the repository must be be public. There is a new command **Dev Containers: Open Repository in Container...** to allow you to work on a repository in a container without locally cloning it first. This lets you work with an isolated copy of a repository, useful for a PR review or to investigate another branch, without impacting what you have currently checked out. The command requires that the repository has a `devcontainer.json` file and, in the current version, the repository must be be public.
Repository Containers use isolated, local Docker volumes instead binding to the local filesystem. In addition to not polluting your file tree, local volumes have the added benefit of improved performance on Windows and macOS. Repository Containers use isolated, local Docker volumes instead binding to the local filesystem. In addition to not polluting your file tree, local volumes have the added benefit of improved performance on Windows and macOS.
To try out the feature, you can run **Remote-Containers: Open Repository in Container...** and enter `microsoft/vscode-remote-try-node`, for example. To try out the feature, you can run **Dev Containers: Open Repository in Container...** and enter `microsoft/vscode-remote-try-node`, for example.
The **Container** section of the Remote Explorer shows the details of a Repository Container, such as the source repository and the local Docker volume. Removing a Repository Container from the explorer will prompt you whether you want to delete the volume. The **Container** section of the Remote Explorer shows the details of a Repository Container, such as the source repository and the local Docker volume. Removing a Repository Container from the explorer will prompt you whether you want to delete the volume.
@ -88,7 +88,7 @@ Other improvements include a **Rebuild Container** command in the context menu o
### Additional Docker extension settings ### Additional Docker extension settings
The [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) comes with three settings for configuring the connection to a remote Docker daemon and all three are supported now by the Remote - Containers extension: The [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) comes with three settings for configuring the connection to a remote Docker daemon and all three are supported now by the Dev Containers extension:
- Docker hostname (same as DOCKER_HOST environment variable). - Docker hostname (same as DOCKER_HOST environment variable).
- Docker certificate path (same as DOCKER_CERT_PATH environment variable). - Docker certificate path (same as DOCKER_CERT_PATH environment variable).

Просмотреть файл

@ -26,17 +26,17 @@ Downloading the server behind proxies has been improved. Downloads and the unpac
### Multi distro support for WSL on Windows 10 builds 1803 and 1809 ### Multi distro support for WSL on Windows 10 builds 1803 and 1809
Users on Windows 10 1803 and 1809 now can open any Linux distribution. If the distro is not the default, the Remote - WSL extension will ask you if you want to change the default distro. Users on Windows 10 1803 and 1809 now can open any Linux distribution. If the distro is not the default, the WSL extension will ask you if you want to change the default distro.
### Open folder and reload performance ### Open folder and reload performance
Changing the input of a Remote - WSL window is now much faster. Changing the input of a WSL window is now much faster.
## Containers ## Containers
### Simpler to try out the Remote Container samples ### Simpler to try out the Dev Container samples
You can now try a Remote Container sample in a single step. Run the **Remote Containers: Try a Development Container Sample...** command and select the repository you want to try. You can now try a Dev Container sample in a single step. Run the **Dev Containers: Try a Dev Container Sample...** command and select the repository you want to try.
![Try a remote sample dropdown](images/1_41/remote-try-sample.png) ![Try a remote sample dropdown](images/1_41/remote-try-sample.png)
@ -54,7 +54,7 @@ See [issue #1823](https://github.com/microsoft/vscode-remote-release/issues/1823
### More flexible opening of a repository into a container ### More flexible opening of a repository into a container
The command [Remote Containers: Open Repository in Container...](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-public-git-repository-in-an-isolated-container-volume) is now more flexible and supports picking the Docker volume the repository should clone into. This enables you to open the same repository into different volumes, for example to investigate different branches of the repository. The command [Dev Containers: Open Repository in Container...](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-public-git-repository-in-an-isolated-container-volume) is now more flexible and supports picking the Docker volume the repository should clone into. This enables you to open the same repository into different volumes, for example to investigate different branches of the repository.
You can now also clone multiple repositories into the same volume so that you do not have to manage multiple volumes. You can now also clone multiple repositories into the same volume so that you do not have to manage multiple volumes.

Просмотреть файл

@ -30,7 +30,7 @@ The remote machine must be Windows 10, running an OpenSSH server, and you must u
### Reveal in Explorer ### Reveal in Explorer
The **Reveal in Explorer** command is now available in a Remote - WSL window. It will open the Windows Explorer on the WSL resource. For files not located in `/mnt/c/..`, this will use the `wsl$` network share: The **Reveal in Explorer** command is now available in a WSL window. It will open the Windows Explorer on the WSL resource. For files not located in `/mnt/c/..`, this will use the `wsl$` network share:
![Reveal In Explorer command](images/1_42/reveal-in-explorer.png) ![Reveal In Explorer command](images/1_42/reveal-in-explorer.png)
@ -42,7 +42,7 @@ The **Reveal in Explorer** command is now available in a Remote - WSL window. It
You can now take advantage of an initial set of pre-built development container images that include common dependencies, such as [Git](https://git-scm.com/), [zsh](https://en.wikipedia.org/wiki/Z_shell), and [Oh My Zsh!](https://ohmyz.sh/). Their sources are available in the [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers) repository and we will be adding more in the future. You can now take advantage of an initial set of pre-built development container images that include common dependencies, such as [Git](https://git-scm.com/), [zsh](https://en.wikipedia.org/wiki/Z_shell), and [Oh My Zsh!](https://ohmyz.sh/). Their sources are available in the [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers) repository and we will be adding more in the future.
These same images are also used when you select the related language / platform by using the **Remote-Containers: Add Development Container Configuration Files** or **Remote-Containers: Open Folder in Container** / **Remote-Containers: Reopen Folder in Container** commands from the Command Palette (`kbstyle(F1)`) on an empty folder. These same images are also used when you select the related language / platform by using the **Dev Containers: Add Dev Container Configuration Files** or **Dev Containers: Open Folder in Container** / **Dev Containers: Reopen in Container** commands from the Command Palette (`kbstyle(F1)`) on an empty folder.
Check out our [Docker Hub page](https://hub.docker.com/_/microsoft-vscode-devcontainers) for a list of available images. Check out our [Docker Hub page](https://hub.docker.com/_/microsoft-vscode-devcontainers) for a list of available images.
@ -56,9 +56,9 @@ We have added support for [dotfiles repositories](https://dotfiles.github.io/).
### Improved iterative development of a devcontainer's Dockerfile ### Improved iterative development of a devcontainer's Dockerfile
The error dialog displayed when a development container fails to start (for example, due to an error when building the Docker image), now has an **Open Folder Locally** action that will reuse the current window and automatically open the log file from the failed startup. When you are ready to try starting your dev container again, the **Remote-Containers: Rebuild and Reopen in Container** command will remove any existing container and start a new one after rebuilding the Docker image. The error dialog displayed when a development container fails to start (for example, due to an error when building the Docker image), now has an **Open Folder Locally** action that will reuse the current window and automatically open the log file from the failed startup. When you are ready to try starting your dev container again, the **Dev Containers: Rebuild and Reopen in Container** command will remove any existing container and start a new one after rebuilding the Docker image.
There is also a new **Remote-Containers: Open Log File...** command for when you want to look at the log of a previous Remote - Containers session. There is also a new **Dev Containers: Open Log File...** command for when you want to look at the log of a previous Dev Containers session.
### forwardPorts configuration property ### forwardPorts configuration property
@ -66,7 +66,7 @@ The `devcontainer.json` file has a new `forwardPorts` property that lists the co
### Open private repositories in containers ### Open private repositories in containers
The command **Remote-Containers: Open Repository in Container** now supports private repositories. One remaining limitation is that the credentials need to be available in the local Git credentials manager when using HTTPS and the key needs to be available in the ssh-agent when using SSH to connect to the Git server. The command **Dev Containers: Open Repository in Container** now supports private repositories. One remaining limitation is that the credentials need to be available in the local Git credentials manager when using HTTPS and the key needs to be available in the ssh-agent when using SSH to connect to the Git server.
### Simplified adding extensions to the devcontainer.json ### Simplified adding extensions to the devcontainer.json

Просмотреть файл

@ -61,7 +61,7 @@ Here is an example:
### Dotfiles repository settings ### Dotfiles repository settings
In the last iteration, we added support for [dotfiles repositories](https://github.com/microsoft/vscode-docs/blob/vnext/remote-release-notes/v1_42.md#dotfiles-repository-support) and corresponding settings `remote.containers.dotfiles.*`. Dotfiles are a generally useful mechanism, and are not only used by VS Code Remote Containers. With that in mind, there are now general settings named `dotfiles.*`, which will eventually allow you to define `dotfiles` preferences with a single setting. In the last iteration, we added support for [dotfiles repositories](https://github.com/microsoft/vscode-docs/blob/vnext/remote-release-notes/v1_42.md#dotfiles-repository-support) and corresponding settings `remote.containers.dotfiles.*`. Dotfiles are a generally useful mechanism, and are not only used by VS Code Dev Containers. With that in mind, there are now general settings named `dotfiles.*`, which will eventually allow you to define `dotfiles` preferences with a single setting.
![General dotfiles settings](images/1_43/general-dotfiles-settings.png) ![General dotfiles settings](images/1_43/general-dotfiles-settings.png)

Просмотреть файл

@ -7,7 +7,7 @@
[Repository Containers](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-in-an-isolated-container-volume) have been supported for several releases. [Repository Containers](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-in-an-isolated-container-volume) have been supported for several releases.
These containers use isolated, local [Docker volumes](https://docs.docker.com/storage/volumes/) instead binding to the local filesystem. In addition to not polluting your file tree, local volumes have the added benefit of improved performance on Windows and macOS. In this release, we have added support to checkout a Pull Request directly into a repository container. You can checkout a Pull Request into a container using: These containers use isolated, local [Docker volumes](https://docs.docker.com/storage/volumes/) instead binding to the local filesystem. In addition to not polluting your file tree, local volumes have the added benefit of improved performance on Windows and macOS. In this release, we have added support to checkout a Pull Request directly into a repository container. You can checkout a Pull Request into a container using:
* The **Remote-Containers: Open Repository in Container** command and entering the corresponding Pull Request, for example `https://github.com/microsoft/vscode-npm-scripts/pull/111`. * The **Dev Containers: Open Repository in Container** command and entering the corresponding Pull Request, for example `https://github.com/microsoft/vscode-npm-scripts/pull/111`. <!-- TBD correct command name? -->
* The [GitHub Pull Request Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github), where you can select the PR and use the command **Checkout Pull Request in Dev Container**. * The [GitHub Pull Request Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github), where you can select the PR and use the command **Checkout Pull Request in Dev Container**.
![Checkout Pull Request](images/1_44/checkout-pr.png) ![Checkout Pull Request](images/1_44/checkout-pr.png)
@ -28,7 +28,7 @@ In addition to entering the GitHub URLs for Pull Requests, you can also enter th
### Kubernetes Support ### Kubernetes Support
You can now attach to a container in Kubernetes. When the [Kubernetes extension](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools) is installed together with the Remote-Containers extension, there is a new context menu entry on **Pods** items: You can now attach to a container in Kubernetes. When the [Kubernetes extension](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools) is installed together with the Dev Containers extension, there is a new context menu entry on **Pods** items:
![Attach to Kubernetes Container](images/1_44/k8s-attach.png) ![Attach to Kubernetes Container](images/1_44/k8s-attach.png)
@ -36,13 +36,13 @@ You can now attach to a container in Kubernetes. When the [Kubernetes extension]
You can now use a set of pre-built Python 3, 3.6, 3.7, and 3.8 development container images, which include common Python utilities (for example, pylint) and dependencies, such as [Git](https://git-scm.com/), [zsh](https://en.wikipedia.org/wiki/Z_shell), and [Oh My Zsh!](https://ohmyz.sh/). Their README and sources are available in the [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3) repository. You can now use a set of pre-built Python 3, 3.6, 3.7, and 3.8 development container images, which include common Python utilities (for example, pylint) and dependencies, such as [Git](https://git-scm.com/), [zsh](https://en.wikipedia.org/wiki/Z_shell), and [Oh My Zsh!](https://ohmyz.sh/). Their README and sources are available in the [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3) repository.
These same images are used when you select the related language / platform by using the **Remote-Containers: Add Development Container Configuration Files** or **Remote-Containers: Open Folder in Container** / **Remote-Containers: Reopen Folder in Container** commands from the Command Palette (`kbstyle(F1)`) on an empty folder. These same images are used when you select the related language / platform by using the **Dev Containers: Add Dev Container Configuration Files** or **Dev Containers: Open Folder in Container** / **Dev Containers: Reopen in Container** commands from the Command Palette (`kbstyle(F1)`) on an empty folder.
Check out our [Docker Hub page](https://hub.docker.com/_/microsoft-vscode-devcontainers) for a list of other available images. Check out our [Docker Hub page](https://hub.docker.com/_/microsoft-vscode-devcontainers) for a list of other available images.
### Support user-supplied project name ### Support user-supplied project name
When using Docker-Compose for your devcontainer, you can now specify a project name by environment variable (`COMPOSE_PROJECT_NAME`) or `.env` file in the project folder. This aligns Remote-Containers with the existing functionality in Docker-Compose. When using Docker-Compose for your devcontainer, you can now specify a project name by environment variable (`COMPOSE_PROJECT_NAME`) or `.env` file in the project folder. This aligns the Dev Containers extension with the existing functionality in Docker-Compose.
### Improved progress indication ### Improved progress indication

Просмотреть файл

@ -4,13 +4,13 @@
### Container Configuration recommendation ### Container Configuration recommendation
When adding a development container configuration for a workspace using the **Remote-Containers: Add Development Container Configuration Files**, we now recommend the container configurations that could be a good fit your workspace. The recommendation is done based on your current platform and programming languages. When adding a development container configuration for a workspace using the **Dev Containers: Add Dev Container Configuration Files**, we now recommend the container configurations that could be a good fit your workspace. The recommendation is done based on your current platform and programming languages.
![Select a container configuration definition dropdown](images/1_45/add-configuration.png) ![Select a container configuration definition dropdown](images/1_45/add-configuration.png)
### WSL 2 Support ### WSL 2 Support
Remote-Containers now supports the WSL 2 based engine of Docker Desktop for Windows. You can author your `devcontainer.json` in WSL 2 using the Remote - WSL extension and then reopen the WSL 2 folder in a container: Dev Containers now supports the WSL 2 based engine of Docker Desktop for Windows. You can author your `devcontainer.json` in WSL 2 using the WSL extension and then reopen the WSL 2 folder in a container:
![Reopen in Container command for WSL 2](images/1_45/containers-wsl2-support.png) ![Reopen in Container command for WSL 2](images/1_45/containers-wsl2-support.png)

Просмотреть файл

@ -20,7 +20,7 @@ You can now inspect the contents of a Docker volume using Visual Studio Code. Th
### Improved iterative development of a devcontainer's Dockerfile for Repository Containers ### Improved iterative development of a devcontainer's Dockerfile for Repository Containers
When **Remote-Containers: Open Repository in Container...** fails to start the [Repository Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume), for example, due to an error when building the Docker image, you can now open the cloned repository in a recovery container. The error dialog shown now provides an action **Reopen in Recovery Container**. This action opens the cloned repository in a minimal container that comes with Git and Docker so that you can correct the error. Once you have fixed the error you can reopen the container with **Remote-Containers: Reopen in Container**. When **Dev Containers: Open Repository in Container...** fails to start the [Repository Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume), for example, due to an error when building the Docker image, you can now open the cloned repository in a recovery container. The error dialog shown now provides an action **Reopen in Recovery Container**. This action opens the cloned repository in a minimal container that comes with Git and Docker so that you can correct the error. Once you have fixed the error you can reopen the container with **Dev Containers: Reopen in Container**.
### GPG forwarding ### GPG forwarding

Просмотреть файл

@ -12,13 +12,13 @@ If you are connecting to a multi-user remote, you may not want the VS Code Remot
### Guidance to open a repository in a volume ### Guidance to open a repository in a volume
When opening a Git repository folder, the **Reopen in Container** notification now offers to clone and reopen the repository in a Docker volume. Using a Docker volume has better disk performance because it uses a Linux filesystem without any extra layer between the Linux Kernel and the filesystem. (We do not show this guidance on Linux, but the feature is still available using the **Remote-Containers: Open Repository in Container** command.) When opening a Git repository folder, the **Reopen in Container** notification now offers to clone and reopen the repository in a Docker volume. Using a Docker volume has better disk performance because it uses a Linux filesystem without any extra layer between the Linux Kernel and the filesystem. (We do not show this guidance on Linux, but the feature is still available using the **Dev Containers: Open Repository in Container** command.)
![Reopen in Container notification](images/1_47/reopenincontainernotification.png) ![Reopen in Container notification](images/1_47/reopenincontainernotification.png)
The **Reopen in Container** notification is also shown when there is a configuration in our [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers/tree/main/repository-containers) repository matching the current folder's Git repository. The **Reopen in Container** notification is also shown when there is a configuration in our [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers/tree/main/repository-containers) repository matching the current folder's Git repository.
If you choose **Don't Show Again**, you will be prompted to clarify if you don't want to see this notification for the current folder only, or for any folder. If you would like to see the notification again, you can reset it for all folders with the **Remote-Containers: Reset Don't Show Reopen Notification** command. If you choose **Don't Show Again**, you will be prompted to clarify if you don't want to see this notification for the current folder only, or for any folder. If you would like to see the notification again, you can reset it for all folders with the **Dev Containers: Reset Don't Show Reopen Notification** command.
### Configurable repository configuration paths ### Configurable repository configuration paths
@ -30,10 +30,10 @@ There is now a setting for adding local lookup paths for configurations to repos
### Attach configuration by container name ### Attach configuration by container name
In addition to having configuration files per Docker image, we now also support configuration files per container name. To create one, first attach VS Code to a running container, and then create a configuration for its name with the **Remote-Containers: Open Named Container Configuration File** command. In addition to having configuration files per Docker image, we now also support configuration files per container name. To create one, first attach VS Code to a running container, and then create a configuration for its name with the **Dev Containers: Open Named Container Configuration File** command.
From then on, the existing **Remote-Containers: Open Container Configuration File** command will open the name configuration and **Open Attached Container Configuration File...** will show both image and name configurations. From then on, the existing **Dev Containers: Open Container Configuration File** command will open the name configuration and **Open Attached Container Configuration File...** will show both image and name configurations.
## WSL ## WSL
With updates to Windows 10 and Docker Desktop Stable in May, WSL 2 in Windows and Docker Desktop is now GA. Check out the blog post [Using Remote Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl) to learn how to develop applications in a Docker container in WSL 2 from VS Code. With updates to Windows 10 and Docker Desktop Stable in May, WSL 2 in Windows and Docker Desktop is now GA. Check out the blog post [Using Dev Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl) to learn how to develop applications in a Docker container in WSL 2 from VS Code.

Просмотреть файл

@ -30,7 +30,7 @@ If VS Code can not find any containers, the Welcome view will prompt you to open
### Support for Docker Compose when cloning repository in container volume ### Support for Docker Compose when cloning repository in container volume
Cloning a repository in a container volume with the **Remote-Containers: Clone Repository in Container Volume** command now also supports DevContainers using Docker Compose. Cloning a repository in a container volume with the **Dev Containers: Clone Repository in Container Volume** command now also supports DevContainers using Docker Compose.
### Select a GitHub repository when cloning a repository in a container volume ### Select a GitHub repository when cloning a repository in a container volume
@ -40,7 +40,7 @@ When cloning a repository in a container volume, you can now select a GitHub rep
### DevContainer definition configuration options ### DevContainer definition configuration options
DevContainer definitions now come with install and configuration options that are shown after picking a definition with the **Remote-Containers: Add Development Container Configuration Files** command. DevContainer definitions now come with install and configuration options that are shown after picking a definition with the **Dev Containers: Add Dev Container Configuration Files** command.
In the example below, when configuring a Java DevContainer, there is the option to select the Java version: In the example below, when configuring a Java DevContainer, there is the option to select the Java version:

Просмотреть файл

@ -16,13 +16,13 @@ It is now possible to install/enable extensions when VS Code is connected to a r
### Improved log access and rendering ### Improved log access and rendering
When you open a folder locally after attempting to open it in a container failed, the new command **Remote-Containers: Show Previous Log** opens the log from the failed attempt to open in a container. When you open a folder locally after attempting to open it in a container failed, the new command **Dev Containers: Show Previous Log** opens the log from the failed attempt to open in a container.
The command **Remote-Containers Developer: Show All Logs...** now shows one file per startup (instead of one file per VS Code session, potentially spanning several startups) making it easier to navigate: The command **Dev Containers Developer: Show All Logs...** now shows one file per startup (instead of one file per VS Code session, potentially spanning several startups) making it easier to navigate:
![Remote-Containers Developer: Show All Logs...](images/1_50/containers-show-all-logs.png) ![Dev Containers Developer: Show All Logs...](images/1_50/containers-show-all-logs.png)
The current log shown in the DevContainer terminal with the **Remote-Containers: Show Log** command now comes with coloring: The current log shown in the DevContainer terminal with the **Dev Containers: Show Container Log** command now comes with coloring:
![Log Coloring](images/1_50/containers-log-coloring.png) ![Log Coloring](images/1_50/containers-log-coloring.png)
@ -44,6 +44,6 @@ When opening a repository in a container volume using `Clone Repository in Conta
### Inherit environment from process where `code .` is executed ### Inherit environment from process where `code .` is executed
The remote WSL window now inherits environment from the WSL shell where `code .` is executed. The WSL window now inherits environment from the WSL shell where `code .` is executed.
![Inherit Environment](images/1_50/wsl-inherit-env.png) ![Inherit Environment](images/1_50/wsl-inherit-env.png)

Просмотреть файл

@ -48,4 +48,4 @@ There's a new command line argument `--install-builtin-extension` to install an
## Containers (version 0.148.x) ## Containers (version 0.148.x)
Only announcing Remote-Containers releases with version 0.148.0. (Issue grooming milestone.) Only announcing Dev Containers releases with version 0.148.0. (Issue grooming milestone.)

Просмотреть файл

@ -95,4 +95,4 @@ Again, the command is restricted to extensions on the WSL side. To install an ex
### Shortcuts to install WSL and WSL distros ### Shortcuts to install WSL and WSL distros
The [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) now guides users how to install WSL and WSL distros when not yet present. It uses the new simplified [`wsl --install`](https://learn.microsoft.com/windows/wsl/install#install-wsl-command) feature available in Windows Preview builds. The [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) now guides users how to install WSL and WSL distros when not yet present. It uses the new simplified [`wsl --install`](https://learn.microsoft.com/windows/wsl/install#install-wsl-command) feature available in Windows Preview builds.

Просмотреть файл

@ -28,7 +28,7 @@ By default, VS Code will find ports to automatically forward for you by looking
### Security update ### Security update
Version 0.163.2 of the Remote-Containers extension includes a fix for a security issue in how the Docker executable's path can be configured. Details are in [CVE-2021-27083](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27083). Version 0.163.2 of the Dev Containers extension includes a fix for a security issue in how the Docker executable's path can be configured. Details are in [CVE-2021-27083](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27083).
### portsAttributes setting in devcontainer.json ### portsAttributes setting in devcontainer.json
@ -50,7 +50,7 @@ The `"postCreateCommand"` (and `"postStartCommand"` and `"postAttachCommand"`) n
### Simplified recommendations for development container configurations ### Simplified recommendations for development container configurations
The command **Add Development Container Configuration Files...** is now only recommending some core configurations on the first page. To see all configurations you can select **Show All Definitions**. The command **Add Dev Container Configuration Files...** is now only recommending some core configurations on the first page. To see all configurations you can select **Show All Definitions**.
Whether a container configuration is a core configuration is defined by meta data that has been added to the development container configs in the [container configurations repository](https://github.com/microsoft/vscode-dev-containers). Whether a container configuration is a core configuration is defined by meta data that has been added to the development container configs in the [container configurations repository](https://github.com/microsoft/vscode-dev-containers).

Просмотреть файл

@ -49,9 +49,9 @@ The setting `remote.otherPortsAttributes` can be used to configure the behavior
### Clone repository in container volume improvements ### Clone repository in container volume improvements
* There is a new command, **Remote-Containers: Clone GitHub Pull Request in Container Volume**. You could already clone a GitHub pull request in a container volume when using the URL of the pull request with the **Remote-Containers: Clone Repository in Container Volume** command. Having a separate command makes the feature more discoverable. * There is a new command, **Dev Containers: Clone GitHub Pull Request in Container Volume**. You could already clone a GitHub pull request in a container volume when using the URL of the pull request with the **Dev Containers: Clone Repository in Container Volume** command. Having a separate command makes the feature more discoverable.
* The command **Remote-Containers: Clone Repository in Container Volume** now also understands Azure DevOps and GitLab repository URLs. * The command **Dev Containers: Clone Repository in Container Volume** now also understands Azure DevOps and GitLab repository URLs.
### Optional install command for dotfiles repository ### Optional install command for dotfiles repository

Просмотреть файл

@ -30,11 +30,11 @@ Any extension can now contribute commands to the Remote Indicator menu. See the
### Security update ### Security update
Version 0.177.2 of the Remote-Containers extension includes a fix for a security issue in how cloning a repository in a Docker volume can execute code from that repository without the user necessarily being aware of this. Details are in [CVE-2021-31213](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-31213). Version 0.177.2 of the Dev Containers extension includes a fix for a security issue in how cloning a repository in a Docker volume can execute code from that repository without the user necessarily being aware of this. Details are in [CVE-2021-31213](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-31213).
### Clone Repository in Container Volume adds a new management view ### Clone Repository in Container Volume adds a new management view
The commands **Remote-Containers: Clone Repository in Container Volume** and **Remote-Containers: Clone GitHub Pull Request in Container Volume** create a Docker volume for the cloned repository. The Remote Explorer now shows a new **DEVVOLUMES** view, where you can inspect and manage these volumes. The commands **Dev Containers: Clone Repository in Container Volume** and **Dev Containers: Clone GitHub Pull Request in Container Volume** create a Docker volume for the cloned repository. The Remote Explorer now shows a new **DEVVOLUMES** view, where you can inspect and manage these volumes.
![Devvolumes view in Remote Explorer](images/1_56/devvolumes-view.png) ![Devvolumes view in Remote Explorer](images/1_56/devvolumes-view.png)
@ -51,11 +51,11 @@ The **DEVVOLUMES** toolbar provides commands to clone a repository in a containe
* The time when the volume was last used. * The time when the volume was last used.
* The containers that are using the volume. * The containers that are using the volume.
The advanced scenario where multiple repositories are cloned in a single volume is still supported. The command **Remote-Containers: Clone Repository in Named Container Volume** allows you to pick an existing or create a new volume for a cloned repository. The advanced scenario where multiple repositories are cloned in a single volume is still supported. The command **Dev Containers: Clone Repository in Named Container Volume** allows you to pick an existing or create a new volume for a cloned repository.
### Launch Docker Desktop installer ### Launch Docker Desktop installer
On Windows and macOS, the Remote - Containers extension offers to download and launch the Docker Desktop installer when Docker is not installed yet. On Windows and macOS, the Dev Containers extension offers to download and launch the Docker Desktop installer when Docker is not installed yet.
### Containers view de-densified ### Containers view de-densified

Просмотреть файл

@ -37,7 +37,7 @@ When using a Dockerfile, you can now specify one or more images to use as caches
### Host requirements ### Host requirements
Remote-Containers now checks if the `"hostRequirements"` in the `devcontainer.json` are met by the Docker daemon's host machine: Dev Containers now checks if the `"hostRequirements"` in the `devcontainer.json` are met by the Docker daemon's host machine:
```json ```json
{ {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше