Run a Visual Studio Code Remote Tunnel in a Docker container allowing you to access the container remotely from Visual Studio Code. This container is based on Debian Bookworm, the current version of Debian as of writing (2023).
docker run -d --name vscode-tunnel \
-v /opt/vscode/projects:/home/workspace \
--network host --restart always --workdir /home/workspace \
domkalan/vscode-tunnel:latestAn image is also published to ghcr.io as an alternative for those who do not use Docker hub.
Multiple Linux Distros are published automatically. Images are updated monthly and are tagged with the current date. For example, December 1st 2025 will be debian-20251201. By default, debian is tagged as the latest image.
The available distros are:
- Debian -
debian,latest - Ubuntu -
ubuntu - Fedora -
fedora - Alpine -
alpine
Once the container is running, you will need to register the tunnel to your GitHub account. View the logs from tunnel to view the steps on how to register.
docker logs -f vscode-tunnelYou should see something like this in your terminal.
*
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
[2023-11-07 23:53:58] info Using Github for authentication, run `code tunnel user login --provider <provider>` option to change this.
To grant access to the server, please log into https://github.com/login/device and use code XXXX-0000
[2023-11-07 23:56:56] info Creating tunnel with the name: vscode-tunnel
Find your grant code from the logs and go to the GitHub Device Link page, provide the token, then your tunnel is now registered.