https://github.com/xczh/docker-image-code-server
6.3K
code-server 在浏览器中运行的Visual Studio Code,支持远程访问。
# ${tag}需替换,在上面的网站找
$ sudo docker pull xczh/code-server:${tag}
可用的环境变量:
PASSWORD HTTP Basic Auth的明文密码,默认为hello_coder。HASHED_PASSWORD HTTP Basic Auth的密码哈希值,默认为空。如该值非空,则忽略PASSWORD。使用Argon2算法生成。CODE_ARGS 附加启动参数,默认为空。几点说明:
--init作为根进程SYS_PTRACE# 需确保 UID 1000 对volume拥有完全权限
$ mkdir -p ~/host-volume
$ chown -R 1000:1000 ~/host-volume
# 运行容器
$ sudo docker run -d --restart=unless-stopped \
--name code \
--hostname code-server \
--init \
--cap-add SYS_PTRACE \
-e PASSWORD=hello_coder \
-p 8080:8080 \
-v ~/host-volume:/volume \
xczh/code-server:${tag}
Content type
Image
Digest
sha256:234afca39…
Size
1.4 GB
Last updated
2 days ago
docker pull xczh/code-server