Overview

Full name
docker.io/nginxdemos/nginx-hello
Registry
docker.io
Namespace
nginxdemos
Repository
nginx-hello
Cached tags
8
Last synced
07/06/2026, 03:46 PM

Introduction

Nginx 官方演示镜像,返回带主机名与环境信息的 Hello 页面,常用于 K8s/Docker 网络与 Ingress 连通性验证。

Details

nginxdemos/nginx-hello 是 NGINX Inc. 提供的极简演示服务,响应 HTML 展示 Pod/容器 hostname 与请求头,广泛用于 Service Mesh、Ingress 与负载均衡测试。镜像无状态、资源占用极低,不适合承载真实业务流量。与 nginx:alpine 相比内置定制页面;实验或 CI 可用 latest,生产演示环境仍建议固定 tag。

快速启动

docker run -d --name nginx-hello \
  -p 8080:80 \
  docker.io/nginxdemos/nginx-hello:latest

推荐实践

docker run -d --name nginx-hello \
  --restart unless-stopped \
  -p 8080:80 \
  docker.io/nginxdemos/nginx-hello:0.25

核心参数说明

  • -p 8080:80 — HTTP 演示页面端口
  • --restart unless-stopped — 探针 demo 持续运行
  • nginx-hello:0.25 — 固定演示版本 tag
  • 用途 — 连通性/灰度验证,非业务应用
  • 轻量 — 无持久化与 env 依赖

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-hello
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx-hello
  template:
    metadata:
      labels:
        app: nginx-hello
    spec:
      containers:
        - name: hello
          image: docker.io/nginxdemos/nginx-hello:0.25
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-hello
spec:
  selector:
    app: nginx-hello
  ports:
    - port: 80
      targetPort: 80

多副本可验证 Service 负载均衡;Ingress 指向本 Service 即可测试路由与 TLS。

Latest tags (20)

View all 8 tags →
TagArchPushed AtSizeDigestSyncWishAction
docker.io/nginxdemos/nginx-hello
:0.3
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2025/08/15 09:3518.3 MBsha256:b55e70611055
docker.io/nginxdemos/nginx-hello
:0.3-plain-text
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2025/08/15 09:3518.3 MBsha256:0415fbd68594
docker.io/nginxdemos/nginx-hello
:latest
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2025/08/15 09:3518.3 MBsha256:b55e70611055
docker.io/nginxdemos/nginx-hello
:plain-text
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2025/08/15 09:3518.3 MBsha256:0415fbd68594
docker.io/nginxdemos/nginx-hello
:0.2-plain-text
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2024/01/28 09:281.1 MBsha256:b1525f1044f5
docker.io/nginxdemos/nginx-hello
:0.2
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2024/01/28 09:2815.0 MBsha256:05f36fc84d36
docker.io/nginxdemos/nginx-hello
:0.1
linux/arm/v6linux/arm/v7linux/arm64linux/s390xlinux/amd64linux/ppc64lelinux/386
2022/03/24 09:339.2 MBsha256:8f9fc5883452
docker.io/nginxdemos/nginx-hello
:0.1-plain-text
linux/arm/v6linux/arm/v7linux/arm64linux/amd64linux/ppc64lelinux/s390xlinux/386
2022/03/24 09:339.2 MBsha256:4b2e4e148c1b