dind-swarm-worker
Docker 应用程序 from Josh.5's Repository
概述
Configure Unraid as a Docker Swarm worker using Docker-in-Docker.
This container runs a dedicated Docker Engine inside Unraid, allowing you to join a Swarm without modifying the host Docker daemon.
Prerequisites (Unraid + macvlan):
- In Unraid, open Settings - Docker.
- Stop Docker, then set "Docker custom network type" to macvlan.
- Enable a custom network on eth0 (e.g., "br0" or "eth0" depending on your setup).
- Assign a fixed IP in the Unraid Docker template (matches the MyIP field). This IP must be
free on your LAN and outside your DHCP pool. - Start Docker again.
Template configuration notes:
- Privileged: recommended for best compatibility with nested containers and features like
overlay networking. Not strictly required, but some inner containers may fail without it. - Hostname and /etc/hosts: update ExtraParams to set a meaningful hostname and host entry:
--hostname='Tower' --add-host='Tower:127.0.0.1'
Replace "Tower" with your Unraid server name or desired node name. - ExtraParams: you can remove --gpus=1 if you do not want GPU access, or set it to a
specific GPU UUID.
After container start (joining the Swarm):
- On your Swarm manager node, generate a worker join token:
docker swarm join-token worker - Copy the join command that it outputs. It looks like:
docker swarm join --token TOKEN MANAGER_IP:2377 - Enter the container console (or use docker exec) and run the join command inside this
container. - Verify on the manager:
docker node ls
You should see this node listed as a worker.
Optional:
- If you want the inner Docker daemon to persist data, ensure the /var/lib/docker path maps
to a stable storage path as configured in the template. - For TLS client certs or custom daemon config, use the mapped /certs and /etc/docker paths.
- You can set the default runtime by writing /etc/docker/daemon.json in the bound config path
(Path: Docker config). Example:
{
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
}
}
运行时参数
- 网络
eth0- 外壳
bash- 特权
- true
- 额外参数
--gpus=1 --hostname='Tower' --add-host='Tower:127.0.0.1'
模板配置
Path: CertificatePathrw
- 目标
- /certs
- 默认值
- /mnt/user/system/dind-swarm-worker/certs
- 价值
- /mnt/user/system/dind-swarm-worker/certs
Path: Docker storagePathrw
- 目标
- /var/lib/docker
- 默认值
- /mnt/user/system/dind-swarm-worker/var/
- 价值
- /var/lib/docker/dind-var/dind-swarm-worker
Path: Docker configPathrw
- 目标
- /etc/docker
- 默认值
- /mnt/user/system/dind-swarm-worker/etc
- 价值
- /mnt/user/system/dind-swarm-worker/etc
Force Insecure TCPVariable
Expose tcp://0.0.0.0:2375 even when TLS is enabled on 2376.
- 目标
- DOCKER_FORCE_INSECURE_TCP
- 默认值
- false
- 价值
- false
Path: /mntPathrw
Provides direct access to the mounted disks
- 目标
- /mnt
- 价值
- /mnt
TimezoneVariable
Container timezone.
- 目标
- TZ
- 默认值
- Etc/UTC
- 价值
- Etc/UTC
Nvidia GPU UUIDVariable
For users with multiple GPUs, add the ID found under the
- 目标
- NVIDIA_VISIBLE_DEVICES
- 默认值
- all
- 价值
- all
Driver CapabilitiesVariable
- 目标
- NVIDIA_DRIVER_CAPABILITIES
- 默认值
- all
- 价值
- all
详细信息
存储库
ghcr.io/josh5/ubuntu-dind:latest最后更新2026-06-01
初见2026-01-21
在Unraid 上运行 dind-swarm-worker 。
dind-swarm-worker 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。