专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
docker

library/docker

Docker 官方镜像

Docker in Docker(通常称为“dind”)是一种允许在Docker容器内部嵌套运行Docker引擎的技术,它能够在一个容器环境中启动、管理其他Docker容器,常用于持续集成/持续部署(CI/CD)流水线、Docker工具开发测试及需要隔离Docker环境的场景,通过这种方式可简化开发、测试和部署流程,同时保持容器化环境的独立性与一致性。

2.7千 次收藏下载次数: 0状态:Docker 官方镜像维护者:Docker 官方镜像仓库类型:镜像最近更新:5 天前
轩辕镜像,快一点,稳很多。点击查看
DockerHub 官方简介
轩辕镜像中文简介
标签下载
镜像标签列表与下载命令
轩辕镜像,快一点,稳很多。点击查看

Quick reference

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

  • Where to get help:
    the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow

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/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/cli/Dockerfile

  • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/dind/Dockerfile

  • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/dind-rootless/Dockerfile

  • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/windows/windowsservercore-ltsc2025/Dockerfile

  • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/windows/windowsservercore-ltsc2022/Dockerfile

Shared Tags

  • 29.4.1-windowsservercore, 29.4-windowsservercore, 29-windowsservercore, windowsservercore:

    • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/windows/windowsservercore-ltsc2025/Dockerfile
    • https://github.com/docker-library/docker/blob/5b5016b9257f0dfc3baf38b575f7505d***b7e/29/windows/windowsservercore-ltsc2022/Dockerfile

Quick reference (cont.)

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

  • Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
    https://hub.docker.com/r/amd64/docker/, https://hub.docker.com/r/arm32v6/docker/, https://hub.docker.com/r/arm32v7/docker/, https://hub.docker.com/r/arm64v8/docker/, https://hub.docker.com/r/winamd64/docker/

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

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

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

What is Docker in Docker?

Although running Docker inside Docker is generally not recommended, there are some legitimate use cases, such as development of Docker itself.

Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux, Mac OS and Windows.

***.org/wiki/Docker_(software)

!https://raw.githubusercontent.com/docker-library/docs/c350af05d3fac7b5c3f6327ac82fe4d990d8729c/docker/logo.png

Before running Docker-in-Docker, be sure to read through https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/, where he outlines some of the pros and cons of doing so (and some nasty gotchas you might run into).

If you are still convinced that you need Docker-in-Docker and not just access to a container's host Docker server, then read on.

How to use this image

![asciicast]([***]

TLS

Starting in 18.09+, the dind variants of this image will automatically generate TLS certificates in the directory specified by the DOCKER_TLS_CERTDIR environment variable.

Warning: in 18.09, this behavior is disabled by default (for compatibility). If you use --network=host, shared network namespaces (as in Kubernetes pods), or otherwise have network access to the container (including containers started within the dind instance via their gateway interface), this is a potential security issue (which can lead to access to the host system, for example). It is recommended to enable TLS by setting the variable to an appropriate value (-e DOCKER_TLS_CERTDIR=/certs or similar). In 19.03+, this behavior is enabled by default.

When enabled, the Docker daemon will be started with --host=tcp://0.0.0.0:2376 --tlsverify ... (and when disabled, the Docker daemon will be started with --host=tcp://0.0.0.0:2375).

Inside the directory specified by DOCKER_TLS_CERTDIR, the entrypoint scripts will create/use three directories:

  • ca: the certificate authority files (cert.pem, key.pem)
  • server: the dockerd (daemon) certificate files (cert.pem, ca.pem, key.pem)
  • client: the docker (client) certificate files (cert.pem, ca.pem, key.pem; suitable for DOCKER_CERT_PATH)

In order to make use of this functionality from a "client" container, at least the client subdirectory of the $DOCKER_TLS_CERTDIR directory needs to be shared (as illustrated in the following examples).

To disable this image behavior, simply override the container command or entrypoint to run dockerd directly (... docker:dind dockerd ... or ... --entrypoint dockerd docker:dind ...).

Start a daemon instance

console
$ docker run --privileged --name some-docker -d \
	--network some-network --network-alias docker \
	-e DOCKER_TLS_CERTDIR=/certs \
	-v some-docker-certs-ca:/certs/ca \
	-v some-docker-certs-client:/certs/client \
	docker:dind

Note: --privileged is required for Docker-in-Docker to function properly, but it should be used with care as it provides full access to the host environment, as explained in the relevant section of the Docker documentation.

Connect to it from a second container

console
$ docker run --rm --network some-network \
	-e DOCKER_TLS_CERTDIR=/certs \
	-v some-docker-certs-client:/certs/client:ro \
	docker:latest version
Client: Docker Engine - Community
 Version:           18.09.8
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        0dd43dd87f
 Built:             Wed Jul 17 17:38:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.8
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       0dd43dd87f
  Built:            Wed Jul 17 17:48:49 2019
  OS/Arch:          linux/amd64
  Experimental:     false
console
$ docker run -it --rm --network some-network \
	-e DOCKER_TLS_CERTDIR=/certs \
	-v some-docker-certs-client:/certs/client:ro \
	docker:latest sh
/ # docker version
Client: Docker Engine - Community
 Version:           18.09.8
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        0dd43dd87f
 Built:             Wed Jul 17 17:38:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.8
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       0dd43dd87f
  Built:            Wed Jul 17 17:48:49 2019
  OS/Arch:          linux/amd64
  Experimental:     false
console
$ docker run --rm --network some-network \
	-e DOCKER_TLS_CERTDIR=/certs \
	-v some-docker-certs-client:/certs/client:ro \
	docker:latest info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 18.09.8
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.19.0-5-amd64
Operating System: Alpine Linux v3.10 (containerized)
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 62.79GiB
Name: e174d61a4a12
ID: HJXG:3OT7:MGDL:Y2BL:WCYP:CKSP:CGAM:4BLH:NEI4:IURF:4COF:AH6N
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
console
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest version
Client: Docker Engine - Community
 Version:           18.09.8
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        0dd43dd87f
 Built:             Wed Jul 17 17:38:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:23:02 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Custom daemon flags

console
$ docker run --privileged --name some-docker -d \
	--network some-network --network-alias docker \
	-e DOCKER_TLS_CERTDIR=/certs \
	-v some-docker-certs-ca:/certs/ca \
	-v some-docker-certs-client:/certs/client \
	docker:dind --storage-driver overlay2

Runtime Settings ***ations

Inspired by the https://github.com/docker/docker-ce-packaging/blob/57ae892b13de399171fc33f878b70e72855747e6/systemd/docker.service#L30-L45, you may want to *** different values for the following runtime configuration options, especially for production Docker instances:

console
$ docker run --privileged --name some-docker -d \
	... \
	--ulimit nofile=-1 \
	--ulimit nproc=-1 \
	--ulimit core=-1 \
	--pids-limit -1 \
	--oom-score-adj -500 \
	docker:dind

Some of these will not be supported based on the settings on the host's dockerd, such as --ulimit nofile=-1, giving errors that look like error setting rlimit type 7: operation not permitted, and some may inherit sane values from the host dockerd instance or may not apply for your usage of Docker-in-Docker (for example, you likely want to set --oom-score-adj to a value that's higher than dockerd on the host so that your Docker-in-Docker instance is killed before the host Docker instance is).

Where to Store Data

Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the docker images to familiarize themselves with the options available, including:

  • Let Docker manage the storage of your data by writing to disk on the host system using its own internal volume management. This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers.
  • Create a data directory on the host system (outside the container) and mount this to a directory visible from inside the container. This places the files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly.

The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:

  1. Create a data directory on a suitable volume on your host system, e.g. /my/own/var-lib-docker.

  2. Start your docker container like this:

    console
    $ docker run --privileged --name some-docker -v /my/own/var-lib-docker:/var/lib/docker -d docker:dind
    

The -v /my/own/var-lib-docker:/var/lib/docker part of the command mounts the /my/own/var-lib-docker directory from the underlying host system as /var/lib/docker inside the container, where Docker by default will write its data files.

Image Variants

The docker images come in many flavors, each designed for a specific use case.

Note: The docker:stable, docker:test, and related "channel" tags have been deprecated since June 2020 (see https://github.com/docker-library/docker/pull/179) and have not been updated since December 2020 (when Docker 20.10 was released). Suggested alternatives are below. X is a placeholder for the version; see the supported tags list for the current set of tags.

  • docker:stable ⏩ docker:latest, docker:dind, docker:X, docker:cli, etc
  • docker:test ⏩ docker:rc, docker:rc-dind, docker:X-rc, docker:rc-cli, etc (only updated when there is an active pre-release; will not point to the same thing as latest)

docker:<version>-cli

This image contains the Docker client command line interface (CLI) and Docker CLI plugins like buildx and compose. This is useful if you need to interact with a remote Docker engine but aren't planning to run the Docker engine in the container.

docker:<version>, docker:<version>-dind

The default variant is the Docker in Docker variant. It contains the Docker engine as well as the Docker CLI and plugins that are included in the cli variant. It is useful for running Docker in Docker and for interacting with a Docker engine via the Docker CLI.

docker:<version>-rootless

For more information about using the experimental "rootless" image variants, see https://github.com/docker-library/docker/pull/174.

Note: just like the regular dind images, --privileged is required for Docker-in-Docker to function properly (https://github.com/docker-library/docker/issues/151#issuecomment-483185972 & https://github.com/docker-library/docker/issues/281#issuecomment-744766015), which is a security issue that needs to be treated appropriately.

Basic example usage:

console
$ docker run -d --name some-docker --privileged docker:dind-rootless
$ docker logs --tail=3 some-docker # to verify the daemon has finished generating TLS certificates and is listening successfully
time="xxx" level=info msg="Daemon has completed initialization"
time="xxx" level=info msg="API listen on /run/user/1000/docker.sock"
time="xxx" level=info msg="API listen on [::]:2376"
$ docker exec -it some-docker docker-entrypoint.sh sh # using "docker-entrypoint.sh" which auto-sets "DOCKER_HOST" appropriately
/ $ docker info --format '{{ json .SecurityOptions }}'
["name=seccomp,profile=default","name=rootless"]

To run with a different UID/GID than the one baked into the image, modify /etc/passwd, /etc/group, and filesystem permissions (especially for the rootless user's home directory) as appropriate; for example:

dockerfile
FROM docker:dind-rootless
USER root
RUN set -eux; \
	sed -i -e 's/^rootless:x:1000:1000:/rootless:x:1234:5678:/' /etc/passwd; \
	sed -i -e 's/^rootless:x:1000:/rootless:x:5678:/' /etc/group; \
	chown -R rootless ~rootless
USER rootless

docker:<version>-windowsservercore

Unfortunately, Windows does not support nested containers, so this image variant only contains the client (intended for use against an existing Docker engine, ala -v //./pipe/docker_engine://./pipe/docker_engine).

License

View https://github.com/docker/docker/blob/eb7b2ed6bbe3fbef588116d362ce595d6e35fc43/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/docker.

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.

Deployment & Usage Documentation

Docker in Docker 容器化部署指南

DOCKER(Docker in Docker,简称DinD)是一种特殊的容器化方案,允许在Docker容器内部运行Docker引擎。尽管通常不推荐在生产环境中使用嵌套容器,但DinD在特定场景下具有重要价值,如Docker引擎本身的开发、CI/CD流水线中的容器化构建环境等。

Read More

镜像拉取方式

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

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

docker pull docker.xuanyuan.run/docker:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull docker:<标签>

更多 docker 镜像推荐

docker/gordon logo

docker/gordon

Docker 官方工具与组件镜像
暂无描述
3 次收藏1亿+ 次下载
6 天前更新
docker/ecs-searchdomain-sidecar logo

docker/ecs-searchdomain-sidecar

Docker 官方工具与组件镜像
Docker Compose "Cloud Integrations"是Docker Compose的云集成工具,可使用现有Docker命令在AWS ECS、Azure ACI等云服务上运行Docker容器和Compose应用。ECS和ACI集成已于2023年11月退役,当前仓库主要处理关键安全修复,ECS用户可考虑使用compose-ecs。
2 次收藏1亿+ 次下载
2 年前更新
docker/ucp-auth logo

docker/ucp-auth

Docker 官方工具与组件镜像
docker/ucp镜像是Docker企业版核心组件,用于构建和管理容器集群,提供集中化控制、多租户管理及安全集成功能,支持企业级容器编排与运维。
4 次收藏5亿+ 次下载
5 年前更新
docker/dockerfile logo

docker/dockerfile

Docker 官方工具与组件镜像
这些是官方提供的Dockerfile前端镜像,主要功能是支持通过BuildKit构建Dockerfile,作为构建流程中的关键前端工具,能够有效配合BuildKit提升Dockerfile的构建效率、安全性与灵活性,为开发者提供官方认可的标准化构建方案,适用于各类基于Docker的应用开发与部署场景,确保构建过程的稳定可靠及操作便捷性。
124 次收藏5亿+ 次下载
18 天前更新
docker/compose logo

docker/compose

Docker 官方工具与组件镜像
Docker Compose是Docker官方提供的工具,可帮助用户通过YAML文件便捷地定义、配置和运行由多个Docker容器组成的应用程序,实现服务、网络和卷等组件的统一管理与一键部署,详情参见官方文档[***]
208 次收藏5000万+ 次下载
4 年前更新
docker/ucp-interlock-proxy logo

docker/ucp-interlock-proxy

Docker 官方工具与组件镜像
暂无描述
2 次收藏1亿+ 次下载
5 年前更新

查看更多 docker 相关镜像

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
Docker 官方镜像
...
library/docker
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.