
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
以无root权限和无发行版方式运行Loki
https://github.com/grafana/loki(由https://github.com/grafana/创建)是一个受Prometheus启发的水平可扩展、高可用、多租户日志聚合系统。它设计为极具成本效益且易于操作,不索引日志内容,而是为每个日志流建立一组标签。
此镜像能做什么? 该镜像以https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md和https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md方式运行Loki,以实现最高安全性和性能。
为什么选择此镜像而非其他现有镜像? 因为:
如果您重视安全性、简洁性和极致优化,此镜像可能适合您。
以下是此镜像与最常用或原始镜像的对比:
| 镜像 | 磁盘大小 | 默认用户 | https://github.com/11notes/RTFM/blob/main/linux/container/image/distroless.md | 支持架构 |
|---|---|---|---|---|
| 11notes/loki | 38MB | 1000:1000 | ✅ | amd64, arm64, armv7 |
| grafana/loki | 156MB | 1000:1000 | ✅ | amd64, arm64, armv7 |
yamlauth_enabled: false server: http_listen_port: 3100 common: instance_addr: 127.0.0.1 path_prefix: /loki/var storage: filesystem: chunks_directory: /loki/var/chunks rules_directory: /loki/var/rules replication_factor: 1 ring: kvstore: store: inmemory schema_config: configs: - from: 2020-10-24 store: tsdb object_store: filesystem schema: v13 index: prefix: index_ period: 24h ruler: alertmanager_url: http://localhost:9093 analytics: reporting_enabled: false
yamlname: "monitoring" x-lockdown: &lockdown # 防止对镜像本身的写访问 read_only: true # 防止容器内任何进程获取更多权限 security_opt: - "no-new-privileges=true" services: loki: image: "docker.xuanyuan.run/11notes/loki:3.7.2" <<: *lockdown environment: TZ: "Europe/Zurich" volumes: - "loki.etc:/loki/etc" - "loki.var:/loki/var" ports: - "3000:3100/tcp" networks: frontend: restart: "always" volumes: loki.etc: loki.var: networks: frontend:
如需更改此容器镜像的默认UID/GID,请参考https://github.com/11notes/RTFM/blob/main/linux/container/image/11notes/how-to.changeUIDGID.md#change-uidgid-the-correct-way。
| 参数 | 值 | 描述 |
|---|---|---|
user | docker | 用户名 |
uid | 1000 | 用户标识符 |
gid | 1000 | 组标识符 |
home | /loki | docker用户的主目录 |
| 参数 | 说明 | 默认值 |
|---|---|---|
TZ | 时区 | 无 |
DEBUG | 激活容器镜像和应用的调试选项(如支持) | 无 |
LOKI_CONFIG (可选) | 如设置,将用此变量值覆盖默认配置(https://github.com/11notes/RTFM/blob/master/linux/container/image/11notes/inline-config.md) | 无 |
以下是镜像的主要标签。每个提交及其简短sha256值也有对应的标签。
我认为:latest标签是个坏习惯,不应使用。许多开发者在新版本中引入破坏性变更,这会给使用:latest的用户带来麻烦。如果不想将标签更改为最新https://semver.org/,可使用语义化版本的短版本。例如,不使用`:3.7.2`,可使用`:3`或`:3.7`。这些标签会在每个新版本中更新为软件的最新版本,使用它们类似于使用`:latest`,但至少固定在主版本或次版本,理论上不会引入破坏性变更。
如果仍坚持使用应用的最新版本,可使用:rolling标签,但请注意!这将立即获取应用的最新版本,无论是否存在破坏性变更或安全问题,风险自负!
docker pull docker.xuanyuan.run/11notes/loki:3.7.2 docker pull ***-ghcr.xuanyuan.run/11notes/loki:3.7.2 docker pull ***-quay.xuanyuan.run/11notes/loki:3.7.2
此镜像默认支持Unraid。只需在任何标签后添加**-unraid**,镜像将以99:100而非1000:1000运行。
此镜像默认支持nobody用户。只需在任何标签后添加**-nobody**,镜像将以65534:65534而非1000:1000运行。
此镜像不基于其他镜像,而是以https://hub.docker.com/_/scratch为基础层。包含以下无发行版层:
此镜像仅供您自行承担风险使用。更新镜像版本前请务必备份。查看https://github.com/11notes/docker-loki/releases了解破坏性变更。如使用此镜像遇到问题,请提交https://github.com/11notes/docker-loki/issues。如有问题或建议,请创建新https://github.com/11notes/docker-loki/discussions而非issue。我的所有其他仓库可在https://github.com/11notes?tab=repositories找到。
创建于2026年5月14日 09:48:12 (CET)
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务