An open API service indexing awesome lists of open source software.

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.

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"```