https://github.com/oxygen-batd/vm_vscode
Run VS Code on any machine anywhere and access it in the browser.
https://github.com/oxygen-batd/vm_vscode
coder docker docker-image k8s traefik visual-studio-code vs-code vscode
Last synced: 4 months ago
JSON representation
Run VS Code on any machine anywhere and access it in the browser.
- Host: GitHub
- URL: https://github.com/oxygen-batd/vm_vscode
- Owner: oxygen-batd
- Created: 2025-02-10T06:32:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T10:15:44.000Z (4 months ago)
- Last Synced: 2025-02-24T11:29:14.424Z (4 months ago)
- Topics: coder, docker, docker-image, k8s, traefik, visual-studio-code, vs-code, vscode
- Language: Shell
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Run VS Code on any machine anywhere and access it in the browser.
## Project struct
```
root/
│── vscode/
│ ├── Dockerfile
│ ├── bin/
│ │ ├── entrypoint.sh
│── docker_swarm/
│ ├── vscode/
│ │ ├── bin
│ │ │ ├── entrypoint.sh
│ ├── traefik/
│ ├── docker-compose.yml
│ ├── remove_user.sh
│ ├── adduser.sh
│ ├── bin/
│ │ ├── entrypoint.sh
│── k8s/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── pvc.yaml
│ ├── config.yaml
│ ├── ingress.yaml
│── .gitignore
│── k8s_deployment.sh
│── README.md
```
## DockerHub (Docker Swarm)
1. Build docker images: ```docker build -t htplus-vscode:latest .```
2. Set tag image: ```docker tag htplus-vscode:latest /htplus-vscode:latest```
3. Push image to DockerHub: ```docker push /htplus-vscode:latest```
## Docker Compose (Docker Swarm)1. Create docker swarm: ```docker swarm leave --force```
2. Init docker swarm: ```docker swarm init```
3. Create stack ```docker stack deploy -c docker-compose.yml my-stack```
4. Add user to stack (openn git bash): ```./adduser.sh ```
5. Check stack: ```docker stack ls```## Kubernetes
### Run with Localhost:
1. Build image ```docker build -t my-vscode-image -f vscode/Dockerfile .```
2. Load image into Kubernetes ```docker tag my-vscode-image my-vscode-image:latest```
3. Run: ```kubectl apply -f k8s/```
4. Check status:```kubectl get pods,svc,ingress```## Tạo SSL (local)
```openssl req -x509 -newkey rsa:4096 -keyout tls.key -out tls.crt -days 365 -nodes -subj "/CN=vscode.localhost"```