
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
基于https://github.com/microsoft/vscode-dev-containers构建的全栈远程开发环境,集成丰富的开发工具、多语言支持和实用程序,旨在为开发者提供开箱即用的高效远程开发体验。
使用方法
shell# 查看可用Python版本 pyenv versions # 切换Python版本 export PYENV_VERSION=3.10 # 创建并激活虚拟环境(使用链接的主版本) mkvirtualenv -p /opt/pyenv/versions/3.10/bin/python hello-world workon hello-world
环境配置
.envrc 文件:
bashlayout virtualenvwrapper hello-world unset PS1
.vscode/settings.json:
json{ "python.defaultInterpreterPath": "/root/.virtualenvs/hello-world/bin/python" }
使用方法
shell# 查看可用Golang版本 gvm list # 切换Golang版本 gvm use go1.17
环境配置
.envrc 文件:
bashlayout gvm go1.17
.vscode/settings.json:
json{ "go.goroot": "/opt/gvm/gos/go1.17", "go.gopath": "/opt/gvm/pkgsets/go1.17/global" }
Golang 私有模块设置
.vscode/settings.json:
json{ "go.goroot": "/opt/gvm/gos/go1.15", "go.gopath": "/opt/gvm/pkgsets/go1.15/global", "go.toolsEnvVars": { "GOPROXY": "https://athens-proxy.townsy.io,direct", "GOPRIVATE": "", "GONOSUMDB": "townsy.private-github.com" }, "terminal.integrated.env.linux": { "GOPROXY": "https://athens-proxy.townsy.io,direct", "GOPRIVATE": "", "GONOSUMDB": "townsy.private-github.com" } }
VSCode 扩展配置
json{ "remote.extensionKind": { "alefragnani.project-manager": ["workspace"] }, "remote.SSH.defaultExtensions": [ "ms-python.python", "ms-python.vscode-pylance", "golang.go", "TabNine.tabnine-vscode", "alefragnani.project-manager" ] }
VSCode 远程SSH设置
~/.vscode-server/data/Machine/settings.json(使用链接的主版本):
json{ "go.goroot": "/opt/gvm/gos/go1.17", "go.gopath": "/opt/gvm/pkgsets/go1.17/global", "go.toolsEnvVars": { "GOBIN": "/opt/go/bin" }, "python.linting.flake8Path": "/usr/local/bin/flake8", "python.linting.flake8Args": ["--max-line-length=119"], "python.formatting.blackPath": "/usr/local/bin/black", "python.formatting.blackArgs": ["--line-length=119"], "python.sortImports.path": "/usr/local/bin/isort", "python.sortImports.args": ["--line-length=119"], "python.terminal.activateEnvironment": false, "git.ignoredRepositories": ["/opt/pyenv"], "projectManager.groupList": true, "projectManager.git.maxDepthRecursion": 4, "projectManager.git.baseFolders": ["/data/repos"] }
错误日志:
bashzsh: bad math expression: operand expected at `*100000 + ...'
解决方案:启用useLocalServer
json{ "remote.SSH.useLocalServer": true }
可能存在https://github.com/microsoft/vscode-remote-release/issues/2525问题,可忽略。
适用于全栈远程开发场景,尤其适合需要Python、Golang多语言开发,依赖高效命令行工具和编辑器配置的开发者。可通过VSCode Remote SSH等方式连接,提供预置的开发环境配置。
shelldocker run -it docker.xuanyuan.run/ifooth/devcontainer
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 ifooth/devcontainer 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: