本文最后更新于 2025年3月17日 下午
code-server 是社区创作的 Web 版 VS Code,后端运行在服务器中,开发者基于浏览器运行 IDE。
部署配置
docker-compose
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| services: code-server: image: codercom/code-server:latest container_name: code-server environment: - TZ=Asia/Shanghai - PASSWORD=PASSWORD user: 1000:1000 volumes: - ./config:/config - ./code-server:/home/coder/project ports: - 8080:8080 restart: unless-stopped
|
启动命令 docker-compose up -d
安装 python3
1 2 3
| sudo apt update sudo apt install python3 python3-dev
|
安装 nodejs
1 2 3 4
| curl -o- https://raw.kkgithub.com/nvm-sh/nvm/v0.40.2/install.sh | bash source ~/.bashrc nvm -v nvm install --lts
|
安装 extension
1 2
| code-server --install-extension ms-python.python code-server --install-extension mhutchie.git-graph
|
参考
[1] 通过docker-compose配置code-server
[2] code-server配置参考