Open yu3peng opened 5 years ago
VS Code remote server 配上 code runner插件,实现一个轻型的在线IDE
后台启动:nohup ./code-server > vscode.log 2>&1 &
杀掉原进程: lsof -i:8443 kill -9 PID
code-server-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: code-server-deployment
labels:
app: code-server
spec:
replicas: 1
selector:
matchLabels:
app: code-server
template:
metadata:
labels:
app: code-server
spec:
hostNetwork: true
containers:
- name: code-server
image: codercom/code-server
imagePullPolicy: IfNotPresent
env:
- name: PASSWORD
value: "123456"
- name: security-opt
value: seccomp=unconfined
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /home/coder/go/src
name: go-src
volumes:
- name: go-src
hostPath:
path: /Users/yupeng/go/src
---
apiVersion: v1
kind: Service
metadata:
name: code-server-svc
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
nodePort: 30080
protocol: TCP
selector:
app: code-server
https://www.y2p.cc/2017/01/10/vs-code-golang/
集成开发工具,墙裂推荐