-
Notifications
You must be signed in to change notification settings - Fork 0
Docker in a Dev Container
VS Code extensions run as either a "Workspace" extension (aka in the dev container) or as a "UI" extension (aka outside the dev container). By default, the Docker extension will run as a "Workspace" extension. Some features (like Intellisense and "Add Docker Files to Workspace") will continue to work whereas others (like viewing and managing images or containers) will not. You have a few options to configure the Docker extension in your remote environment.
Open up two instances of VS Code - one "remote" instance in your dev container and one normal instance outside of the container. Use the normal instance for any feature that doesn't work inside the remote instance.
Run Docker as a "UI" extension by changing the following setting and reloading VS Code:
"remote.extensionKind": {
"ms-azuretools.vscode-docker": "ui"
}This enables some features, but still not the full feature set. For any unsupported feature, you will see a warning like this:

You can switch back to a "Workspace" extension or ignore the warning and upvote #1260, which is meant to improve this experience.
NOTE: If you think the above warning is incorrectly blocking functionality that should work, you can disable it by setting docker.showRemoteWorkspaceWarning to true.
This is currently the only option that allows you to leverage the full feature set of the Docker extension in one instance of VS Code. However, it is the most complicated to set up. Follow the steps outlined here.
Maintaining good quality documentation is a priority for the Docker extension team. If you find missing or inaccurate content, or if you'd like to extend the wiki with a topic or tutorial, please let us know by opening an issue.