docker 部署code-server
1.创建一个存放配置的目录
mkdir -p ~/.config/code-server
2.拉取最新codeserver镜像
docker pull codercom/code-server:latest
3.启动容器配置宿主机挂载点
docker run -it --name code-server -p 8099:8080 -v "$HOME/.config/code-server:/root/.config/code-server" -v "/home/workspace:/home/coder/project" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" codercom/code-server:latest
4.修改配置
# 修改自己的访问密码 vim ~/.config/code-server/config.yaml
5.重启code-server容器
docker restart code-server
本文来自博客园,作者:大楚打码人,转载请注明原文链接:https://www.cnblogs.com/qh1688/p/16888530.html