
如果你使用 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%60s390x%60%E6%9E%B6%E6%9E%84%E6%9E%84%E5%BB%BA%E7%9A%84%22per-architecture%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%EF%BC%8C%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%84%22%E9%99%A4amd64%E4%B9%8B%E5%A4%96%E7%9A%84%E6%9E%B6%E6%9E%84%EF%BC%9F%22https://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%84%22%E9%95%9C%E5%83%8F%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81%E5%9C%A8Git%E4%B8%AD%E6%9B%B4%E6%94%B9%E4%BA%86%EF%BC%8C%E7%8E%B0%E5%9C%A8%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F%22https://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链接https://github.com/docker-library/ghost/blob/e092f980a4b38a***f42b7eceb7b80d441e202/6/debian/Dockerfile
https://github.com/docker-library/ghost/blob/fdba3d80f50da610007165f5fe46f9b8af69764b/5/debian/Dockerfile
提交issue的位置:
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构建,具有快速、用户友好的特点。
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 s390x/ghost
如果希望从主机直接访问实例而无需使用容器IP,可以使用标准端口映射:
console$ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://localhost:3001 -p 3001:2368 s390x/ghost
如果一切正常,你可以通过http://localhost:3001访问新站点,并通过http://localhost:3001/ghost访问Ghost管理界面(或分别通过http://host-ip:3001和http://host-ip:3001/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 \ s390x/ghost:alpine
注意:database__connection__filename仅在开发模式下有效,用于指定SQLite数据库文件的位置。如果使用开发模式,应将其设置为持久化文件夹(绑定挂载或卷)中的可写路径。生产模式下不可用,因为需要外部MySQL服务器(见下文的Docker Compose示例)。
也可使用命名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 \ s390x/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 s390x/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%E3%80%82
要在生产环境运行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%E3%80%82
对于任何预构建镜像的使用,镜像用户有责任确保对本镜像的任何使用都符合其中包含的所有软件的相关许可证。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 s390x/ghost 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: