hello-world

library/hello-world

“Hello World!”是一个经典的入门示例,具体而言是最小化Docker化的范例,它通过简单的应用展示了如何利用Docker将程序打包为容器,涵盖基础的镜像构建与容器运行流程,适合初学者快速理解Docker的核心概念及基本操作,直观体现了Docker化的简洁性与入门友好性。

2.6千 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像最近更新:11 天前
让 AI 帮你使用轩辕镜像?

如果你使用 DeepSeek元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AIDeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

下载命令
点击查看

hello-world 镜像介绍

快速参考

维护者

[Docker 社区]

获取帮助的渠道

[Docker 社区 Slack] 、[Server Fault] 、[Unix & Linux] 或 [Stack Overflow]

支持的标签及对应 Dockerfile 链接

(关于“Shared 标签”和“Simple 标签”的区别,可参考 [FAQ] )

Simple 标签

  • [linux]
  • [nanoserver-ltsc2025]
  • [nanoserver-ltsc2022]

Shared 标签

  • latest

    • [linux]
    • [nanoserver-ltsc2025]
    • [nanoserver-ltsc2022]
  • nanoserver

    • [nanoserver-ltsc2025]
    • [nanoserver-ltsc2022]

快速参考(续)

  • 提交 issue 地址
    [[]]

  • 支持的架构([更多信息] ):
    [amd64] 、[arm32v5] 、[arm32v6] 、[arm32v7] 、[arm64v8] 、[i386] 、[mips64le] 、[ppc64le] 、[riscv64] 、[s390x] 、[windows-amd64]

  • 镜像详情(如元数据、传输大小等):
    [repo-info 仓库的 repos/hello-world/ 目录] ([历史记录] )

  • 镜像更新
    [official-images 仓库的 library/hello-world 标签]
    [official-images 仓库的 library/hello-world 文件] ([历史记录] )

  • 本文档来源
    [docs 仓库的 hello-world/ 目录] ([历史记录] )

运行示例

console
$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 [] more examples and ideas, visit:
 [] docker images hello-world
REPOSITORY    TAG       IMAGE ID       SIZE
hello-world   latest    1b44b5a3e06a   10.07kB

镜像创建方式

该镜像是有效使用 [scratch] 基础镜像的典型示例。镜像中包含的 hello 可执行文件源代码见:[hello.c] (GitHub 仓库链接)。

由于镜像仅包含一个静态二进制文件(用于输出文本),因此可直接以任意用户身份运行,例如:
docker run --user $RANDOM:$RANDOM hello-world

许可证

镜像中软件的许可证信息可查看 [LICENSE 文件] 。

与所有 Docker 镜像类似,本镜像可能包含其他软件(如基础系统的 Bash 等),这些软件可能适用不同许可证。部分自动检测到的许可证信息可参考 [repo-info 仓库的 hello-world/ 目录] 。

使用前,用户需自行确保对镜像中所有软件的使用符合相关许可证要求。

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面

轩辕镜像加速拉取命令点我查看更多 hello-world 镜像标签

docker pull docker.xuanyuan.run/hello-world:<标签>

DockerHub 原生拉取命令

docker pull hello-world:<标签>

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持99.95% SLA 保障付费会员免广告