hello-world

library/hello-world

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

2.6千 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像最近更新:1 个月前
让 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

下载命令
点击查看

Quick reference

  • Maintained by:
    https://github.com/docker-library/hello-world

  • Where to get help:
    https://dockr.ly/comm-slack, Server Fault, https://unix.stackexchange.com/help/on-topic, or https://stackoverflow.com/help/on-topic

Supported tags and respective Dockerfile links

(See https://github.com/docker-library/faq#whats-the-difference-between-shared-and-simple-tags.)

Simple Tags

  • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/Dockerfile

  • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2025/Dockerfile

  • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2022/Dockerfile

Shared Tags

  • latest:

    • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/Dockerfile
    • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2025/Dockerfile
    • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2022/Dockerfile
  • nanoserver:

    • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2025/Dockerfile
    • https://github.com/docker-library/hello-world/blob/0b0efba82b82ace81ab2fb42d25116f9488e6cb4/amd64/nanoserver-ltsc2022/Dockerfile

Quick reference (cont.)

  • Where to file issues:
    https://github.com/docker-library/hello-world/issues?q=

  • Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
    https://hub.docker.com/r/amd64/hello-world/, https://hub.docker.com/r/arm32v5/hello-world/, https://hub.docker.com/r/arm32v6/hello-world/, https://hub.docker.com/r/arm32v7/hello-world/, https://hub.docker.com/r/arm64v8/hello-world/, https://hub.docker.com/r/i386/hello-world/, https://hub.docker.com/r/mips64le/hello-world/, https://hub.docker.com/r/ppc64le/hello-world/, https://hub.docker.com/r/riscv64/hello-world/, https://hub.docker.com/r/s390x/hello-world/, https://hub.docker.com/r/winamd64/hello-world/

  • Published image artifact details:
    https://github.com/docker-library/repo-info/blob/master/repos/hello-world (https://github.com/docker-library/repo-info/commits/master/repos/hello-world)
    (image metadata, transfer size, etc)

  • Image updates:
    https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fhello-world
    https://github.com/docker-library/official-images/blob/master/library/hello-world (https://github.com/docker-library/official-images/commits/master/library/hello-world)

  • Source of this description:
    https://github.com/docker-library/docs/tree/master/hello-world (https://github.com/docker-library/docs/commits/master/hello-world)

Example output

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:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/


$ docker images hello-world
REPOSITORY    TAG       IMAGE ID       SIZE
hello-world   latest    e2ac70e7319a   10.07kB

!https://raw.githubusercontent.com/docker-library/docs/01c***b2fe592c1f93a13b4e289ada0e3a1/hello-world/logo.png

How is this image created?

This image is a prime example of using the https://hub.docker.com/_/scratch/ image effectively. See https://github.com/docker-library/hello-world/blob/master/hello.c in https://github.com/docker-library/hello-world for the source code of the hello binary included in this image.

Because this image consists of nothing but a single static binary which prints some text to standard output, it can trivially be run as any arbitrary user (docker run --user $RANDOM:$RANDOM hello-world, for example).

License

View https://github.com/docker-library/hello-world/blob/master/LICENSE for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in https://github.com/docker-library/repo-info/tree/master/repos/hello-world.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

镜像拉取方式

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

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

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

DockerHub 原生拉取命令

docker pull hello-world:<标签>

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

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