This project provides a Dockerized environment to run a Visual Studio Code Remote Tunnel. It allows you to connect to this container remotely using VS Code from anywhere, without needing SSH.
- Docker
- Docker Compose
You can start the tunnel using Docker Compose. This will build the image and start the container.
docker compose up -dOn the first run, you need to authenticate the tunnel with your GitHub or Microsoft account.
Check the container logs to find the authentication code and URL:
docker compose logs -f vscode-tunnelYou will see a message similar to:
To grant access to the server, please log into https://github.com/login/device and use code XXXX-XXXX
Follow the link and enter the code to link this tunnel to your account.
- Open VS Code on your local machine.
- Install the Remote - Tunnels extension.
- Open the Command Palette (
F1orCtrl+Shift+P) and runRemote-Tunnels: Connect to Tunnel.... - Select the tunnel name defined in your configuration (default:
remote-machine).
You can configure the tunnel name by modifying the TUNNEL_NAME environment variable in compose.yml.
environment:
- TUNNEL_NAME=my-custom-tunnel-nameThe VS Code CLI data (including authentication tokens) is persisted using a Docker volume named vscode-cli-data. This ensures you don't have to re-authenticate every time you restart the container.
- User:
ubuntu - Password:
ubuntu