如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
RStudio提供两种内容镜像:content-base(内容基础镜像)和content-pro(内容专业镜像)。content-base是基础镜像,包含运行基础示例所需的大部分系统依赖、单一版本的R和单一版本的Python。content-pro则基于content-base构建,额外安装了RStudio Pro驱动。构建content-pro镜像前,必须先构建对应R和Python版本的content-base镜像,否则会导致构建错误。
content-base镜像构建,继承其系统依赖、R和Python版本content-base镜像匹配(相同R和Python版本)适用于需要特定R和Python版本组合的开发环境或应用部署场景,尤其适合使用RStudio Pro功能的用户。可用于构建标准化的运行环境,确保应用在不同部署环境中使用一致的依赖版本。
必须先构建content-base镜像,再构建content-pro镜像。尝试使用不存在的content-base镜像构建content-pro镜像将导致错误。
scripts/build-image-yaml.sh脚本用于分析镜像并生成YAML格式的运行时信息。该脚本会在容器内运行scripts/examine-image.sh分析脚本,将进度信息输出到stderr,分析结果(YAML格式)输出到stdout。
生成单个镜像的YAML
console./scripts/build-image-yaml.sh rstudio/content-base:r3.6.3-py3.8.8-bionic > runtime.yaml
生成多个content-base镜像的合并YAML
console./scripts/build-image-yaml.sh rstudio/content-base:r3.1.3-py2.7.18-bionic \ rstudio/content-base:r3.2.5-py2.7.18-bionic \ rstudio/content-base:r3.3.3-py3.6.13-bionic \ rstudio/content-base:r3.4.4-py3.6.13-bionic \ rstudio/content-base:r3.4.4-py3.7.10-bionic \ rstudio/content-base:r3.5.3-py2.7.18-bionic \ rstudio/content-base:r3.5.3-py3.7.10-bionic \ rstudio/content-base:r3.6.3-py2.7.18-bionic \ rstudio/content-base:r3.6.3-py3.6.13-bionic \ rstudio/content-base:r3.6.3-py3.8.8-bionic \ rstudio/content-base:r4.0.5-py3.6.13-bionic \ rstudio/content-base:r4.0.5-py3.7.10-bionic \ rstudio/content-base:r4.0.5-py3.8.8-bionic \ rstudio/content-base:r4.0.5-py3.9.2-bionic \ rstudio/content-base:r4.1.0-py3.8.8-bionic \ rstudio/content-base:r4.1.0-py3.9.2-bionic > runtime.yaml
生成多个content-pro镜像的合并YAML
console./scripts/build-image-yaml.sh rstudio/content-pro:r3.1.3-py2.7.18-bionic \ rstudio/content-pro:r3.2.5-py2.7.18-bionic \ rstudio/content-pro:r3.3.3-py3.6.13-bionic \ rstudio/content-pro:r3.4.4-py3.6.13-bionic \ rstudio/content-pro:r3.4.4-py3.7.10-bionic \ rstudio/content-pro:r3.5.3-py2.7.18-bionic \ rstudio/content-pro:r3.5.3-py3.7.10-bionic \ rstudio/content-pro:r3.6.3-py2.7.18-bionic \ rstudio/content-pro:r3.6.3-py3.6.13-bionic \ rstudio/content-pro:r3.6.3-py3.8.8-bionic \ rstudio/content-pro:r4.0.5-py3.6.13-bionic \ rstudio/content-pro:r4.0.5-py3.7.10-bionic \ rstudio/content-pro:r4.0.5-py3.8.8-bionic \ rstudio/content-pro:r4.0.5-py3.9.2-bionic \ rstudio/content-pro:r4.1.0-py3.8.8-bionic \ rstudio/content-pro:r4.1.0-py3.9.2-bionic > runtime.yaml
环境变量配置
NO_PATH_LOOKUPS:设置此变量时,分析脚本将忽略PATH环境变量,直接查找R、Python和Quarto的安装位置
示例:
consoleNO_PATH_LOOKUPS=1 ./scripts/build-image.sh \ rstudio/content-pro:r3.1.3-py2.7.18-bionic > runtime.yaml
DEBUG:设置此变量可输出镜像分析的额外调试信息
示例:
consoleDEBUG=1 ./scripts/build-image.sh \ rstudio/content-pro:r3.1.3-py2.7.18-bionic > runtime.yaml
CONTENT_BUILD_MATRIX变量在buildx bake配置文件中定义,用于指定构建content-base和content-pro镜像时使用的R和Python版本组合。添加新的版本组合只需更新该矩阵,GitHub Action会在下次推送到main分支时自动将新镜像组合发布到仓库。
本地构建
从仓库根目录执行以下命令可在本地构建内容镜像:
consolejust bake content-images
content-base和content-pro镜像通过build-bake工作流自动构建。
RStudio Docker Products仓库的许可信息位于https://github.com/rstudio/rstudio-docker-products/blob/main/LICENSE.md%E3%80%82
与所有容器镜像一样,本镜像包含的其他软件(如bash、Linux、系统库等)可能受其他许可协议约束。镜像用户有责任确保对本镜像(及其依赖层)的使用符合所有包含软件的相关许可要求。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




来自真实用户的反馈,见证轩辕镜像的优质服务