
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/docker/pulls/alexeye/devtools-polyglot](https://hub.docker.com/r/alexeye/devtools-polyglot) https://img.shields.io/docker/image-size/alexeye/devtools-polyglot/latest](https://hub.docker.com/r/alexeye/devtools-polyglot) https://github.com/alexeye/custom-docker/actions/workflows/devtools-polyglot.yml/badge.svg](https://github.com/alexeye/custom-docker/actions/workflows/devtools-polyglot.yml)
适用于VS Code远程容器的生产就绪多语言开发容器。
针对构建微服务、数据管道和云原生应用(目标平台为Azure、Databricks及容器化环境)的团队优化。
bashdocker pull alexeye/devtools-polyglot:latest
| 挑战 | 解决方案 |
|---|---|
| "在我机器上能运行" | 为整个团队提供一致的环境 |
| 入职流程缓慢 | 新开发者可在几分钟内投入生产 |
| 工具版本冲突 | 隔离、可复现的工具链 |
| 重建时丢失配置 | 命名卷持久化所有内容 |
| 凭证管理 | VS Code自动处理Git/SSH |
| 运行时 | 版本 | 包管理器 | 使用场景 |
|---|---|---|---|
| Python | 3.10, 3.11, 3.12 | https://github.com/astral-sh/uv | 数据工程、机器学习、API |
| Go | 1.23 | Go Modules | 微服务、命令行工具 |
| Node.js | 22 LTS | npm | 前端、工具链 |
| .NET | 9.0 | dotnet | 企业级API |
| 工具 | 描述 | 文档 |
|---|---|---|
| https://github.com/astral-sh/uv | 快速Python包管理器(比pip快10-100倍) | 文档 |
| https://github.com/astral-sh/ruff | 快速Python代码检查和格式化工具 | 文档 |
| https://github.com/python/mypy | 静态类型检查器 | https://mypy.readthedocs.io/ |
| https://github.com/pytest-dev/pytest | 测试框架 | https://docs.pytest.org/ |
| https://github.com/ipython/ipython | 增强型交互式Shell | https://ipython.readthedocs.io/ |
| https://github.com/jupyter/jupyter | 笔记本支持 | https://jupyter.org/documentation |
| https://pypi.org/project/databricks-connect/ | 连接到Databricks集群 | https://docs.databricks.com/dev-tools/databricks-connect.html |
| 工具 | 描述 | 文档 |
|---|---|---|
| https://pkg.go.dev/golang.org/x/tools/gopls | Go语言服务器 | https://github.com/golang/tools/tree/master/gopls |
| https://github.com/go-delve/delve | Delve调试器 | https://github.com/go-delve/delve/tree/master/Documentation |
| https://github.com/golangci/golangci-lint | 元代码检查工具 | 文档 |
| https://github.com/vvka-141/pgmi | PostgreSQL部署工具 | https://github.com/vvka-141/pgmi |
| 工具 | 描述 |
|---|---|
| https://www.typescriptlang.org/ | TypeScript编译器 |
| ts-node | TypeScript执行工具 |
| https://eslint.org/ | JavaScript代码检查工具 |
| https://prettier.io/ | 代码格式化工具 |
| 工具 | 版本 | 描述 |
|---|---|---|
| https://www.postgresql.org/docs/current/app-psql.html | 17 | PostgreSQL客户端 |
| https://docs.databricks.com/dev-tools/cli/index.html | latest | Databricks CLI |
在项目中创建.devcontainer/devcontainer.json:
json{ "name": "我的项目", "image": "alexeye/devtools-polyglot:latest" }
在VS Code中打开 → "在容器中重新打开" → 完成。
json{ "name": "我的项目", "image": "alexeye/devtools-polyglot:latest", "mounts": [ "source=polyglot-shell-history,target=/home/vscode/.shell_history,type=volume", "source=polyglot-databricks-config,target=/home/vscode/.config/databricks,type=volume", "source=polyglot-azure-config,target=/home/vscode/.azure,type=volume", "source=polyglot-go-cache,target=/home/vscode/go/pkg,type=volume", "source=polyglot-npm-cache,target=/home/vscode/.npm,type=volume", "source=polyglot-uv-cache,target=/home/vscode/.cache/uv,type=volume" ], "containerEnv": { "DATABRICKS_CONFIG_FILE": "/home/vscode/.config/databricks/databrickscfg" }, "postStartCommand": "uv sync 2>/dev/null || true", "remoteUser": "vscode" }
捆绑的devcontainer.json包含以下扩展:
| 类别 | 扩展 |
|---|---|
| AI | Claude Code、GitHub Copilot、Copilot Chat |
| Python | Python、Pylance、Ruff |
| Go | Go |
| TypeScript | ESLint、Prettier |
| .NET | C#、C# Dev Kit |
| Azure | Docker、Azure Functions、Azure Account |
| Databricks | Databricks |
| 数据库 | SQLTools、PostgreSQL Driver |
| 生产力 | GitLens、Error Lens、Todo Tree、Code Spell Checker |
| 数据 | 卷 | 是否保留 |
|---|---|---|
| Databricks配置 | polyglot-databricks-config | ✅ 是 |
| Azure CLI登录信息 | polyglot-azure-config | ✅ 是 |
| Shell历史 | polyglot-shell-history | ✅ 是 |
| Go模块 | polyglot-go-cache | ✅ 是 |
| npm包 | polyglot-npm-cache | ✅ 是 |
| Python包 | polyglot-uv-cache | ✅ 是 |
| 功能 | 工作原理 |
|---|---|
| Git凭证 | https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials |
| SSH密钥 | SSH代理转发(无需挂载) |
| VS Code扩展 | 在.vscode-server中管理 |
| VS Code设置 | 通过设置同步同步 |
bashdatabricks configure # 输入工作区URL和令牌 # 保存到~/.config/databricks/databrickscfg(持久化卷)
pythonfrom databricks.connect import DatabricksSession spark = DatabricksSession.builder.getOrCreate() df = spark.sql("SELECT * FROM my_catalog.my_schema.my_table") df.show()
json{ "containerEnv": { "DATABRICKS_HOST": "${localEnv:DATABRICKS_HOST}", "DATABRICKS_TOKEN": "${localEnv:DATABRICKS_TOKEN}" } }
https://github.com/vvka-141/pgmi%E6%98%AFPostgreSQL%E5%8E%9F%E7%94%9F%E9%83%A8%E7%BD%B2%E5%B7%A5%E5%85%B7%EF%BC%8C%E5%85%81%E8%AE%B8%E5%AE%8C%E5%85%A8%E7%94%A8SQL%E7%BC%96%E5%86%99%E9%83%A8%E7%BD%B2%E9%80%BB%E8%BE%91%E3%80%82
bash# 初始化带脚手架的新项目 pgmi init myapp --template basic # 部署到数据库(读取pgmi.yaml配置) pgmi deploy . # 用显式连接部署 pgmi deploy . --connection "postgresql://user:pass@localhost/mydb" # 部署到特定数据库 pgmi deploy . --database staging_db # 覆盖参数 pgmi deploy . --param env=production
项目结构使用deploy.sql存储SQL逻辑,可选pgmi.yaml存储配置。
bashpsql -h localhost -U postgres -d mydb
bash# 创建新项目 uv init my-project && cd my-project # 添加依赖 uv add fastapi uvicorn sqlalchemy # 添加开发依赖 uv add --dev pytest ruff mypy # 运行应用 uv run python -m uvicorn main:app --reload # 运行测试 uv run pytest
bash# 列出可用版本 uv python list # 将项目固定到特定版本 uv python pin 3.10 # 创建带特定版本的虚拟环境 uv venv --python 3.11
| 端口 | 默认服务 |
|---|---|
| 5432 | PostgreSQL |
| 3000 | Node.js / Vite |
| 8000 | Python / FastAPI |
| 8080 | Go / 通用服务 |
| 属性 | 值 |
|---|---|
| 基础镜像 | mcr.microsoft.com/devcontainers/base:1-bookworm |
| 架构 | linux/amd64, linux/arm64 |
| 大小 | ~3.3 GB(压缩后) |
| 用户 | vscode(非root) |
| 每周更新 | UTC时间周日5:00 |
确保配置了卷挂载:
json"mounts": [ "source=polyglot-databricks-config,target=/home/vscode/.config/databricks,type=volume" ], "containerEnv": { "DATABRICKS_CONFIG_FILE": "/home/vscode/.config/databricks/databrickscfg" }
VS Code会自动处理。若问题持续:
bash# 检查主机上的凭证助手 git config --global credential.helper # 对于SSH,验证代理是否运行 ssh-add -l
首次拉取需下载约3GB。后续启动因Docker层缓存而加快。
bashgit clone https://github.com/alexeye/custom-docker.git cd custom-docker # 构建 make polyglot # 测试 make polyglot-test # 交互式Shell make shell IMAGE=devtools/polyglot
Apache-2.0
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务