
如果你使用 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%E7%9A%84%60i386%60%E6%9E%B6%E6%9E%84%E6%9E%84%E5%BB%BA%E7%9A%84%22%E6%AF%8F%E6%9E%B6%E6%9E%84%22%E4%BB%93%E5%BA%93%E2%80%94%E2%80%94%E6%9B%B4%E5%A4%9A%E4%BF%A1%E6%81%AF%E8%AF%B7%E5%8F%82%E8%A7%81%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8F%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84https://github.com/docker-library/official-images#architectures-other-than-amd64%E5%92%8C%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8FFAQ%E4%B8%AD%E7%9A%84https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what%E3%80%82
维护者:
https://github.com/docker-library/ghost
获取帮助:
https://dockr.ly/comm-slack%E3%80%81Server Fault、https://unix.stackexchange.com/help/on-topic%E6%88%96https://stackoverflow.com/help/on-topic
Dockerfile链接警告:此镜像在i386架构上不受支持**
问题提交地址:
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/arm32v7/ghost/%E3%80%81https://hub.docker.com/r/arm64v8/ghost/%E3%80%81https://hub.docker.com/r/s390x/ghost/
已发布镜像工件详情:
https://github.com/docker-library/repo-info/blob/master/repos/ghost (https://github.com/docker-library/repo-info/commits/master/repos/ghost)
(镜像元数据、传输大小等)
镜像更新:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fghost
https://github.com/docker-library/official-images/blob/master/library/ghost (https://github.com/docker-library/official-images/commits/master/library/ghost)
此描述的来源:
https://github.com/docker-library/docs/tree/master/ghost (https://github.com/docker-library/docs/commits/master/ghost)
Ghost是一个独立的在线发布平台,支持通过网络和电子邮件通讯发布内容。它内置用户注册、访问控制和订阅支付功能(通过Stripe),允许您与受众建立直接关系。它速度快、用户友好,运行在Node.js和MySQL8上。
https://ghost.org
!https://raw.githubusercontent.com/docker-library/docs/c88522f95bebcab2322f3020f2f735210286939b/ghost/logo.png
以下命令将启动一个Ghost开发实例,监听默认的Ghost端口2368:
console$ docker run -d --name some-ghost -e NODE_ENV=development i386/ghost
如果希望从主机访问实例而无需使用容器IP,可以使用标准端口映射:
console$ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://localhost:3001 -p 3001:2368 i386/ghost
如果一切顺利,您将能够通过http://localhost:3001访问新站点,并通过http://localhost:3001/ghost访问Ghost管理界面(或分别通过http://host-ip:3001和http://host-ip:3001/ghost)。
升级Ghost
升级主版本前,应确保运行的是最新的次版本,否则可能会遇到数据库错误。
要升级Ghost容器,需将数据挂载到之前容器的相应路径(见下文):从管理面板导入内容,停止容器,然后将内容重新挂载到要升级到的后续容器中;之后可以从管理面板导出内容。
挂载现有内容。此示例还使用基于Alpine Linux的镜像:
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 \ i386/ghost:alpine
注意:database__connection__filename仅在开发模式下有效,是SQLite数据库文件的位置。如果使用开发模式,应将其设置为持久文件夹(绑定挂载或卷)中的可写路径。生产模式下不可用,因为需要外部MySQL服务器(见下文的Docker Compose示例)。
Docker卷
也可以使用命名https://docs.docker.com/storage/volumes/%E4%BB%A3%E6%9B%BF%60/var/lib/ghost/content%60%E7%9A%84%E7%9B%B4%E6%8E%A5%E4%B8%BB%E6%9C%BA%E8%B7%AF%E5%BE%84%EF%BC%9A
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 \ i386/ghost
所有Ghost配置参数(如url)都可以通过环境变量指定。有关允许的配置以及如何将嵌套配置键转换为适当的环境变量名称的详细信息,请参见https://ghost.org/docs/concepts/config/#running-ghost-with-config-env-variables%EF%BC%9A
console$ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://some-ghost.example.com i386/ghost
(下文列出的compose.yaml中有更多配置示例。)
在https://github.com/TryGhost/Ghost/issues%E6%8F%90%E4%BA%A4%E5%B7%A5%E5%8D%95%E6%97%B6%EF%BC%8C%E9%9C%80%E8%A6%81%E7%9F%A5%E9%81%93%E6%89%80%E4%BD%BF%E7%94%A8%E7%9A%84Node.js%E7%89%88%E6%9C%AC%EF%BC%9A
console$ docker exec <container-id> node --version [node版本输出]
虽然Docker镜像中包含Ghost-CLI并使用其部分命令设置基础Ghost镜像,但许多其他Ghost-CLI命令无法正常工作,也并非设计用于此目的。更多信息请参见https://github.com/docker-library/ghost/issues/156#issuecomment-428159861
要运行生产环境的Ghost,还需要运行MySQL 8、https,并配置带有适当X-Forwarded-For、X-Forwarded-Host和X-Forwarded-Proto(https)头的反向代理。
以下示例演示了运行MySQL所需的一些必要配置。有关更多详细信息,请参见https://ghost.org/docs/config/#configuration-options%E3%80%82
ghost的compose.yaml示例:
yamlservices: ghost: image: docker.xuanyuan.run/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: docker.xuanyuan.run/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://host-ip:8080(视情况而定)。
查看此镜像中包含的软件的https://ghost.org/license/%E3%80%82
与所有Docker镜像一样,这些镜像可能还包含其他软件,这些软件可能受其他许可证约束(如基础发行版中的Bash等,以及包含的主要软件的任何直接或间接依赖项)。
可能能够自动检测到的一些其他许可证信息可以在https://github.com/docker-library/repo-info/tree/master/repos/ghost%E4%B8%AD%E6%89%BE%E5%88%B0%E3%80%82
对于任何预构建镜像的使用,镜像用户有责任确保对此镜像的任何使用都符合其中包含的所有软件的相关许可证。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 i386/ghost 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: