VSCode Tunnel Docker is a Docker-based solution to deploy and manage a VSCode server accessible through a secure tunnel. It provides a seamless development environment accessible from anywhere.
- Download docker-compose.yml
version: '3.8'
services:
vscode-tunnel:
image: wenutu/vscode-tunnel-docker:latest
container_name: vscode-tunnel
environment:
PROVIDER: github # github, microsoft
BUILD: stable # stable, insider
MACHINE_NAME: vscode-tunnel-docker
volumes:
- ./workspace:/root/workspace
- ./vscode_data:/root/.vscode-server
- ./vscode_cli_data:/root/.vscode/cli
restart: unless-stopped
- Build and run the container:
docker-compose up -d
- Clone the repository:
git clone https://github.com/Wenutu/vscode-tunnel-docker.git
cd vscode-tunnel-docker
- Create a docker-compose.override.yml with your specific configurations:
version: '3.8'
services:
vscode-tunnel:
environment:
MACHINE_NAME: your-custom-machine-name
- Build and run the container:
docker-compose up -d
Environment | value |
---|---|
PROVIDER | github(microsoft) |
MACHINE_NAME | vscode-tunnel-docker |
- After starting the container, check the logs to follow the setup process:
docker logs vscode-tunnel
Output will look like:
* 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).
*
[20xx-xx-xx xx:xx:xx] 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-xxxx
- Log in at https://github.com/login/device and use code above
- Visit https://vscode.dev/tunnel/{MACHINE_NAME} to access your VSCode workspace.