I'm on Linux and get the error "connect EACCES /var/run/docker.sock"
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.
Docker containers and images have disappeared from Docker view
This is most likely caused by a conflict with another extension called Docker Explorer
(not authored by Microsoft). To fix it, try the 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). - If using a remote development environment (remote machine via SSH, WSL subsystem, GitHub Codespace), ensure that Docker extension is installed remotely in addition to being installed locally.
Invalid URL Errors
If you have a need to connect to a remote Docker daemon, we highly recommend using Docker contexts instead of a docker.environment.DOCKER_HOST
setting in the VSCode extension settings. Check out this guide to learn how to create and use a context to communicate with a remote Docker daemon.
If you still need to override the Docker context you are currently using, make sure your DOCKER_HOST
environment variable or docker.environment.DOCKER_HOST
setting includes a protocol in the URL (e.g ssh://myuser@mymachine or tcp://1.2.3.4).
Important Note: Keep in mind that the
DOCKER_HOST
environment variable will override what is used by Docker contexts, and thedocker.environment.DOCKER_HOST
setting will override both theDOCKER_HOST
environment variable and what is used by Docker contexts.
Tip: In PowerShell you can change your docker environment variable with
$ENV:DOCKER_HOST = 'ssh://username@1.2.3.4'
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.