-
Notifications
You must be signed in to change notification settings - Fork 521
Troubleshooting
Since VS Code runs as a non-root user, you will need to follow the steps in "Manage Docker as a non-root user" from Post-installation steps for Linux for the extension to be able to access docker.
This is most likely caused by a conflict with another extension called Docker Explorer
(not authored by Microsoft). We are working with the author of that extension to have it fixed permanently. In the meantime, use a workaround described here.
The extension does not find Docker on a remote machine ("Failed to connect. Is Docker installed and running?" error)
- Make sure Docker engine is installed on the remote machine and that Docker CLI works (do
docker ps
and ensure it does not return any errors). - Verify that Docker extension is installed on the remote machine. As of February 2020 there is a bug in VS Code that prevents the Docker extension to be installed remotely if it is already installed locally. This bug is scheduled to be fixed in VS Code 1.43 release. A workaround to get the extension installed remotely is described here.
When using our tools, your docker host URL needs to follow a specific syntax to work with our Extension. Depending on your server's protocol, you need to prepend your protocol explicity with ssh, tcp, or other (e.g ssh://[email protected] or tcp://1.2.3.4). This issue is common because generally the Docker CLI accepts a DOCKER_HOST environment variable URL with the need for a prepended protocol. These errors mainly affect Node users.
If you do not want to change your docker.host
attribute from settings.json
of your workspace folder, which overrides the DOCKER_HOST environment variable, you can change the env var from the command line (OS specific).
For example, In Powershell you can change your docker environment variable with $ENV:DOCKER_HOST = 'newVar'
Important Note: The
docker.host
attribute insettings.json
overrides anyDOCKER_HOST
env variable on your PC. Provide a few examples...
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.