如果你使用 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://hub.docker.com/_/ghost 的 arm32v7 架构专用仓库。更多信息请参见官方镜像文档中的 https://github.com/docker-library/official-images#architectures-other-than-amd64 和官方镜像 FAQ 中的 https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what%E3%80%82
维护者:
https://github.com/docker-library/ghost
获取帮助:
Docker 社区 Slack、Server Fault、Unix & Linux 或 Stack Overflow
https://github.com/docker-library/ghost/blob/e092f980a4b38a***f42b7eceb7b80d441e202/6/debian/Dockerfile
https://github.com/docker-library/ghost/blob/e092f980a4b38a***f42b7eceb7b80d441e202/6/alpine/Dockerfile
https://github.com/docker-library/ghost/blob/fdba3d80f50da610007165f5fe46f9b8af69764b/5/debian/Dockerfile
https://github.com/docker-library/ghost/blob/fdba3d80f50da610007165f5fe46f9b8af69764b/5/alpine/Dockerfile
提交问题:
https://github.com/docker-library/ghost/issues?q=
支持的架构: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
https://hub.docker.com/r/amd64/ghost/%E3%80%81https://hub.docker.com/r/arm32v6/ghost/%E3%80%81https://hub.docker.com/r/arm32v7/ghost/%E3%80%81https://hub.docker.com/r/arm64v8/ghost/%E3%80%81https://hub.docker.com/r/ppc64le/ghost/%E3%80%81https://hub.docker.com/r/s390x/ghost/
镜像工件详情:
https://github.com/docker-library/repo-info/blob/master/repos/ghost%EF%BC%88https://github.com/docker-library/repo-info/commits/master/repos/ghost%EF%BC%89
(包含镜像元数据、传输大小等)
镜像更新:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fghost
https://github.com/docker-library/official-images/blob/master/library/ghost%EF%BC%88https://github.com/docker-library/official-images/commits/master/library/ghost%EF%BC%89
本描述来源:
https://github.com/docker-library/docs/tree/master/ghost%EF%BC%88https://github.com/docker-library/docs/commits/master/ghost%EF%BC%89
Ghost 是一个独立的在线发布平台,支持通过网页和电子邮件通讯发布内容。内置用户注册、访问权限控制和订阅支付功能(集成 Stripe),帮助您与受众建立直接关系。它运行于 Node.js 和 MySQL8 之上,具有快速、易用的特点。
Ghost 官方网站
!https://raw.githubusercontent.com/docker-library/docs/c88522f95bebcab2322f3020f2f735210286939b/ghost/logo.png
以下命令将启动一个 Ghost 开发实例,监听默认端口 2368:
console$ docker run -d --name some-ghost -e NODE_ENV=development arm32v7/ghost
若需从主机直接访问实例(无需通过容器 IP),可使用端口映射:
console$ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://localhost:3001 -p 3001:2368 arm32v7/ghost
成功启动后,可通过 http://localhost:3001 访问网站,通过 http://localhost:3001/ghost 访问管理后台(或使用 http://主机IP:3001 和 http://主机IP:3001/ghost)。
升级 Ghost
升级主版本前,需确保当前运行的是最新次版本,否则可能导致数据库错误。升级步骤:
挂载内容目录
以下示例使用 Alpine 版本镜像,并挂载本地内容目录:
console$ docker run -d \ --name some-ghost \ -e NODE_ENV=development \ -e database__connection__filename='/var/lib/ghost/content/data/ghost.db' \ -p 3001:2368 \ -v /path/to/ghost/blog:/var/lib/ghost/content \ arm32v7/ghost:alpine
注意:database__connection__filename 仅在开发模式下有效,用于指定 SQLite 数据库文件路径。开发模式下需将其设置为持久化目录(绑定挂载或卷)中的可写路径。生产模式下不可用,需使用外部 MySQL 服务器(见下文 Docker Compose 示例)。
使用 Docker 卷
也可使用命名卷替代直接挂载主机路径:
console$ docker run -d \ --name some-ghost \ -e NODE_ENV=development \ -e database__connection__filename='/var/lib/ghost/content/data/ghost.db' \ -p 3001:2368 \ -v some-ghost-data:/var/lib/ghost/content \ arm32v7/ghost
所有 Ghost 配置参数(如 url)均可通过环境变量指定。详见 Ghost 配置文档 了解支持的配置项及嵌套配置键与环境变量的转换规则:
console$ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://some-ghost.example.com arm32v7/ghost
(更多配置示例见下文 Docker Compose 配置)
在 https://github.com/TryGhost/Ghost/issues 提交问题时需提供 Node.js 版本:
console$ docker exec <容器ID> node --version [Node.js 版本输出]
Docker 镜像中已包含 Ghost-CLI 并使用其部分命令,但多数其他命令可能无法正常工作,也非设计用途。详见 https://github.com/docker-library/ghost/issues/156#issuecomment-428159861%E3%80%82
生产环境需配合 MySQL 8、HTTPS 及反向代理(配置 X-Forwarded-For、X-Forwarded-Host、X-Forwarded-Proto: https 头)。以下是 Docker Compose 示例:
Docker Compose 配置
yamlservices: ghost: image: ghost:5-alpine restart: always ports: - 8080:2368 environment: # 详见 https://ghost.org/docs/config/#configuration-options database__client: mysql database__connection__host: db database__connection__user: root database__connection__password: example database__connection__database: ghost # url 需根据实际环境修改 url: http://localhost:8080 # 镜像默认运行在生产模式(NODE_ENV=production),开发模式需显式指定 #NODE_ENV: development volumes: - ghost:/var/lib/ghost/content db: image: mysql:8.0 restart: always environment: MYSQL_ROOT_PASSWORD: example volumes: - db:/var/lib/mysql volumes: ghost: db:
执行 docker compose up,等待初始化完成后访问 http://localhost:8080 或 http://主机IP:8080。
arm32v7/ghost 提供多种变体以适应不同场景:
arm32v7/ghost:<version>默认镜像。若不确定需求,建议使用此版本。适用于临时容器(挂载源码启动应用)及作为基础镜像构建其他镜像。
arm32v7/ghost:<version>-alpine基于 Alpine Linux(https://hub.docker.com/_/alpine%EF%BC%89%E6%9E%84%E5%BB%BA%E3%80%82Alpine 基础镜像体积极小(~5MB),因此最终镜像更精简。
此变体适用于对镜像体积有严格要求的场景。注意其使用 musl libc 而非 glibc,部分依赖 glibc 特性的软件可能运行异常。详见 相关讨论。
Alpine 镜像通常不含额外工具(如 git、bash),如需可在 Dockerfile 中自行安装(参考 https://hub.docker.com/_/alpine/%EF%BC%89%E3%80%82
查看镜像中软件的 许可证信息。
与所有 Docker 镜像一样,本镜像可能包含其他软件,这些软件可能具有独立许可证(如基础镜像中的 Bash 等)。
自动检测到的额外许可证信息可在 https://github.com/docker-library/repo-info/tree/master/repos/ghost 中找到。
使用预构建镜像时,用户需确保其使用符合镜像中所有软件的相关许可证要求。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

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