code-server-4.22.1-linux-amd64.tar.gz
Dockerfile
FROM python:3.10.13-slim
ADD code-server-4.22.1-linux-amd64.tar.gz /opt/
ADD settings.json /root/.local/share/code-server/User/
RUN /opt/code-server-4.22.1-linux-amd64/bin/code-server \
--install-extension ms-ceintl.vscode-language-pack-zh-hans
ENV LANG zh_CN.UTF-8
EXPOSE 8888
ENTRYPOINT ["sh","/root/entrypoint.sh"]
cfg.yml
bind-addr: 0.0.0.0:8888
auth: password
password: "密码"
cert: false
Entrypoint.sh
/opt/code-server-4.22.1-linux-amd64/bin/code-server --config /root/cfg.yml --disable-update-check --locale=zh-cn
启动后的访问地址
#
http://192.168.110.51:8899/
#带目录
http://192.168.110.51:8899/?folder=/data/rasa
#带密码
http://192.168.110.51:8899/?folder=/data/rasa