Docker-in-Docker-DinD

Docker-in-Docker-DinD

官方

Docker 应用程序 from testdasi's Repository

概述

Unraid template for the official Docker-in-Docker (aka DinD) image. Build docker images directly using your Unraid server as a node i.e. without needing to run a VM - just expose TCP port like you would for a network build node. This is NOT a start-it-and-forget-it set up so PLEASE READ THE NOTES. NOTES: (1) I'm not affiliated with Docker. I just realised nobody created an Unraid template for this really useful image that I have been using for a while (e.g. all my Unraid docker images are built on this via buildx node) so I share this for the community. If Docker ever has an official template then I'll deprecate this one. (2) Must be run in Bridge network mode. Don't bother doing macvlan (aka "br0" / "br1" Unraid docker network), the child dockers will always fail due to lack DNS resolving errors. Don't bother with host network, it crashes my whole docker network every time, requiring a reboot to reset. (3) It is possible to run this rootless / without privileged with the appropriate image tag and config but I could never get it to work properly. Hence, this template requires to run docker with root in privileged mode - with all the usual warning about it. (4) I do NOT recommend mapping /var/lib/docker (i.e. the equivalent to Unraid docker image) unless you actually need it. I don't map it and just delete dangling volume using user scripts. (5) This template has TLS enabled by default and the certs will be saved at wherever you map /certs to on the host. If the /certs is empty, a script will automatically create certificates for you. Port 2376 is used to access docker service through TCP with TLS. As always, buildx will require the full set of certificates to authenticate but note VERY IMPORTANTLY: you have to set it up using DNS name (e.g. by adding the docker name and the Unraid server IP to /etc/hosts and set buildx to use docker_name:2376) and not directly by IP. (5a) Alternatively, once the certificates have been generated (i.e. docker was run at least once), you need to map the FILE /certs/server/openssl.conf to a host file as READ-ONLY (to prevent the docker TLS generator script from overwriting it) + make your appropriate edits + delete the rest of the /certs folder content and let the certificate generator script run again for new certs. You can even do wildcard and stuff like that but I'm not going into details here. (5b) If the above is too complicated for you, just run it without TLS (set DOCKER_TLS_CERTDIR variable to blank). But be mindful that docker has been screaming that this will be deprecated in a (yet-undetermined) future version. And you will need to map 2375 port. (6) You don't need to map both 2375 and 2376. 2375 for non-TLS. 2376 for TLS.

运行时参数

网络
bridge
外壳
sh
特权
true

模板配置

TLS TCP PortPorttcp

Container Port: 2376

目标
2376
默认值
2376
价值
2376
Non-TLS TCP PortPorttcp

Container Port: 2375

目标
2375
默认值
2375
价值
2375
CertificatePathrw

Container Path: /certs

目标
/certs
默认值
/mnt/cache/appdata/dind/certs
价值
/mnt/cache/appdata/dind/certs
Docker storagePathrw

Container Path: /var/lib/docker

目标
/var/lib/docker
默认值
/mnt/cache/appdata/dind/docker
价值
/mnt/cache/appdata/dind/docker
DOCKER_TLS_CERTDIRVariable

Container Variable: DOCKER_TLS_CERTDIR

默认值
/certs
价值
/certs

下载统计数据

0
下载总数
22,579,612
本月
19,953,765
平均每月

长期下载总量

加载图表...

详细信息

存储库
docker:dind
最后更新2026-05-08
初见2022-03-27

在Unraid 上运行 Docker-in-Docker-DinD 。

Docker-in-Docker-DinD 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。