
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Apache Sling Starter Docker镜像是Apache Sling项目的一部分,用于生成可通过https://github.com/apache/sling-org-apache-sling-feature-launcher启动的功能工件。该镜像**并非生产就绪的设置**,主要用途是为Sling的实验和学习提供便利,帮助开发者快速搭建Sling运行环境。
支持以下标签,对应不同版本的Apache Sling Starter:
| 标签 | 说明 | Dockerfile链接 | 发布说明链接 |
|---|---|---|---|
12, latest | Apache Sling Starter 12(最新稳定版) | https://github.com/apache/sling-org-apache-sling-starter/blob/org.apache.sling.starter-12/Dockerfile | https://sling.apache.org/news/sling-12-released.html |
11 | Apache Sling Starter 11 | https://github.com/apache/sling-org-apache-sling-starter-docker/blob/11/Dockerfile | https://sling.apache.org/news/sling-11-released.html |
10 | Apache Sling Starter 10 | https://github.com/apache/sling-org-apache-sling-starter-docker/blob/10/Dockerfile | https://sling.apache.org/news/sling-10-released.html |
9 | Apache Sling Launchpad 9 | https://github.com/apache/sling-org-apache-sling-starter-docker/blob/9/Dockerfile | https://sling.apache.org/news/sling-launchpad-9-released.html |
snapshot | 基于master分支最新版本的开发构建 | https://github.com/apache/sling-org-apache-sling-starter/blob/master/Dockerfile | - |
Docker镜像仅需暴露8080端口即可启动:
bashdocker run --rm -p 8080:8080 docker.xuanyuan.run/apache/sling:snapshot
启动后可通过 http://localhost:8080 访问Sling。
Oak SegmentStore(默认)
默认使用Oak SegmentStore(本地存储),无需额外配置,直接运行上述基本命令即可。
MongoDB支持
若需使用MongoDB存储后端,启动命令需指定聚合文件:
bashdocker run --rm -p 8080:8080 docker.xuanyuan.run/apache/sling:snapshot oak_mongo
注意:需确保MongoDB服务器已运行,默认连接URL为 mongodb://localhost:27017(可在功能文件中搜索 mongodb:// 查看具体配置)。
为避免容器重启后数据丢失,推荐将 /opt/sling/launcher 目录挂载为Docker卷:
bashdocker volume create sling-launcher
bashdocker run --rm -p 8080:8080 -v sling-launcher:/opt/sling/launcher docker.xuanyuan.run/apache/sling:snapshot
可通过Maven命令构建自定义Docker镜像,默认情况下Docker构建被跳过,需指定 -Ddocker.skip=false 参数:
bashmvn clean package -Ddocker.skip=false -Ddocker.label=local
上述命令将构建标签为 apache/sling:local 的镜像,可通过以下命令运行:
bashdocker run --rm -p 8080:8080 docker.xuanyuan.run/apache/sling:local
若需扩展Sling Starter并排除应用级功能(如Composum、Slingshot等),可基于 nosample_base 聚合启动,该聚合包含:
例如,启动带Segment持久化的空Sling Starter:
bashtarget/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-nosample_base.json,target/slingfeature-tmp/feature-oak_persistence_sns.json
可在功能列表中添加自定义功能文件以扩展功能。
scripts 目录包含辅助脚本,简化Sling Starter外部工具的本地开发使用。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务