搭建code-server

搭建网页版的vscode

1
rm -rf  /home/codeserver
1
ssh-keygen -t rsa -b 4096 -C "vscode"

golang环境

1
2
3
4
5
6
7
wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz

curl -O https://go.dev/dl/go1.20.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin
source /etc/profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
docker kill code-server
docker rm code-server


docker run -d \
--name=code-server \
-e TZ=Etc/UTC \
-e PUID=0 \
-e PGID=0 \
-e PASSWORD=272745 \
-e SUDO_PASSWORD=272745 \
-e DEFAULT_WORKSPACE=/home/codeserver/workspace \
-e HOME=/home/codeserver/ \
-p 8443:8443 \
-v /home/codeserver/workspace:/home/codeserver/workspace \
-v /home/codeserver/config:/config \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
--restart unless-stopped \
lscr.io/linuxserver/code-server:latest

作者

舰长胡椒

发布于

2023-05-23

更新于

2023-10-13

许可协议

评论