轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥8起我的订单
文档
工具
提交工单页面收录
samba-dc

instantlinux/samba-dc

instantlinux
自动构建

这是一个Samba域控制器Docker镜像,支持域的创建(provision)和加入(join),需配置静态IP和持久化卷,运行于host网络模式并具备CAP_SYS_ADMIN权限,适用于构建Active Directory环境,提供域管理、DNS服务及用户认证功能。

29 次收藏下载次数: 0状态:自动构建维护者:instantlinux仓库类型:镜像最近更新:17 天前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
轩辕镜像,快一点,稳很多。
点击查看

samba-dc

Samba domain controller.

Usage

The most-common directives can be specified in environment variables as shown below. If you need further customizations, put them in one or more files under mount point /etc/samba.d.

Basic requirements:

  • A Domain Controller must have a static IP address and persistent DNS entry
  • This container must be run in network_mode:host, and with cap_add:CAP_SYS_ADMIN privs
  • A NETBIOS_NAME or hostname must be specified, which becomes the netbios name.

The directories /etc/samba and /var/lib/samba must be mounted as persistent volumes. If /var/lib/samba is empty, the "provision" or "join" action specified in DOMAIN_ACTION variable will be taken.

The most-common directives can be specified in environment variables as shown below. If you need further customizations, put them in one or more files under mount point /etc/samba/conf.d. If you want to add global settings, put those into the first file with a name like 0globals.conf -- they will be appended in alphabetical-sort sequence.

Test your configuration and/or manage contents of your directory using Apache Directory Studio. Make a connection on port 636 with method SSL encryption (ldaps); specify simple authentication with username <your name>. The ldaps certificate is self-signed so you'll need to accept it first.

This repo has complete instructions for https://github.com/instantlinux/docker-tools/blob/main/k8s/README.md where you can launch with https://github.com/instantlinux/docker-tools/tree/main/images/samba-dc/helm or https://github.com/instantlinux/docker-tools/blob/main/images/samba-dc/kubernetes.yaml using make and customizing https://github.com/instantlinux/docker-tools/blob/main/k8s/Makefile.vars after cloning this repo:

git clone https://github.com/instantlinux/docker-tools.git
cd docker-tools/k8s
# This take target is defined in Makefile.instances
make dc03

Status

  • The "join" command is tested as a spare domain controller against Active Directory running on Windows Server 2008, and against other samba4 domain controllers.
  • The "provision" is tested as a Samba4 domain controller with a Windows 7 client.
  • The "BIND_INTERFACES_ONLY" option is working now.
  • It is very difficult to get multiple instances of samba-dc replicating with one another. I've given up on it as of version 4.8.8; perhaps a future version will fix these problems.

Variables

VariableDefaultDescription
ADMIN_PASSWORD_SECRETsamba-admin-passwordname of admin secret, see below
ALLOW_DNS_UPDATESsecureenable DNS updates
BIND_INTERFACES_ONLYyesspecify IP addresses or interfaces
DNS_FORWARDER(none)value to place in dns forwarder in smb.conf
DOMAIN_ACTIONprovisionset to 'join' if existing domain
DOMAIN_LOGONSyessupport workgroup login
DOMAIN_MASTERno"WAN-wide browse list collation"--haha, see https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
INTERFACESlo eth0list of IP addresses or interfaces
LOG_LEVEL1log verbosity
MODELstandardprocess model: single, standard, thread
NETBIOS_NAME(hostname -s)the NETBIOS name
REALMad.example.comactive-directory DNS realm (use lowercase)
SERVER_STRINGSamba Domain Controllerserver identity
TZUTClocal timezone
WINBIND_USE_DEFAULT_DOMAINyesallow username without domain component
WORKGROUPADworkgroup (realm prefix - poorly documented)

Secrets

This is only needed at first run, for samba domain provision or join. Do NOT leave your domain-controller administrator secret activated at any other time. For clarity, this is a docker-secret with the initial Samba admin password, not the password itself. It must contain a passphrase of sufficient complexity.

SecretDescription
samba-admin-passworddomain-administrator pw

Secrets can be specified as kubernetes secrets, files (see the secrets section of the example https://github.com/instantlinux/docker-tools/blob/main/images/samba-dc/docker-compose.yml provided in this repo), or as swarm secrets.

Notes

Getting a domain-controller cluster up and running properly requires a lot of correctly-configured trust relationships established between domain controllers, and Samba's documentation of error messages and problem-resolutions is pretty thin. If you're only running this version of samba, it's likely there will be few problems. But in a mixed environment with Microsoft Active Directory servers and/or older versions of samba4, you're bound to run into problems that require tweaking. A few diagnostic commands are available within this container; here are notes that might help you get up and running more quickly:

  • You need an obscure DNS entry for your new domain controller that sometimes isn't automatically set up via samba-tool: go onto the instance and type the following "magic" to do it:
export LDB_MODULES_PATH=/usr/lib/samba/ldb
ldbsearch -H /var/lib/samba/private/sam.ldb '(invocationid=*)' \
 --cross-ncs objectguid|grep -i -B 1 -A 1 <new dc hostname>
samba-tool dns add dc01 _msdcs.ether.ci.net <guid from above> \
 CNAME <new dc fqdn> -UAdministrator
  • If you're running with older versions of samba and see any DRS replication errors mentioning LDAP SASL, add this configuration under /etc/samba/conf.d/0global.conf:
ldap server require strong auth = no
  • Look for errors in replication:
samba-tool drs showrepl
  • Check the local databases:
samba-tool dbcheck
samba-tool drs kcc
  • Make sure replication works both ways (copy the names like dc=foo that you see in output of drs showrepl):
./samba-tool drs replicate dc1 dc2 dc=<foo...>,dc=<suffix> --full-sync
./samba-tool drs replicate dc2 dc1 dc=<foo...>,dc=<suffix> --full-sync
  • Using nslookup or host, list the DNS records for the new domain controller's FQDN. It should only have one record, with the correct IP address. Get rid of spurious ones and add the correct one using commands like:
samba-tool dns add <dc> <domain> <dc> A <ip> -Uadministrator
samba-tool dns delete <dc> <domain> <dc> A <ip> -Uadministrator
  • If you're getting "tsig verify failure" for samba_dnsupdate in your logs, run this command manually on each of your controllers to set up the required DNS names for replication. It won't eliminate these errors but at least you can get replication working:
samba_dnsupdate --all-names --use-samba-tool
  • If domain-join fails with "LDAP error 10 LDAP_REFERRAL" with stack trace, there are problably stale DNS records lingering on your existing domain controllers. Look for the FQDN in this error message (looks like ldap://abcdef-abc-xxx._msdcs.your.domain) and remove from ALL of your domain controllers:
for DC in dc1 dc2 dc3 etc; do
  samba-tool dns delete $DC _msdcs.<domain> abcdef-abc-xxx CNAME <host> -Uadministrator
done
  • To fully clean out replication state for a secondary domain controller, shut it down, clear its /var/lib/samba/private volume contents, and while it's shut down do these on the primary:
samba-tool domain demote --remove-other-dead-server=<badhost>
samba-tool dbcheck --cross-ncs --fix

Then restart the secondary with DOMAIN_ACTION=join.

  • With docker it's real easy to get a bunch of stale entries in your domain controller list. The latest version of samba4 provides a way to prune them: {noformat} samba-tool domain demote --remove-other-dead-server=xxx {noformat}

  • If you get the error message shown here, check that the samba-admin-password secret contains a value.

ERROR(ldb): uncaught exception - Element clearTextPassword has empty attribute in ldb
message (CN=Administrator,CN=Users,DC=ad,DC=***,DC=nl)

Contributing

If you want to make improvements to this image, see https://github.com/instantlinux/docker-tools/blob/main/CONTRIBUTING.md.

更多相关 Docker 镜像与资源

以下是 instantlinux/samba-dc 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • elswork/samba Docker 镜像说明(Samba 文件共享服务,支持 SMB/CIFS 协议)
  • dockurr/samba Docker 镜像说明(Samba 文件共享服务,支持 SMB/CIFS 协议)
  • servercontainers/samba Docker 镜像说明(Samba 文件共享(servercontainers),适合 SMB/CIFS 网络存储)
  • crazymax/samba Docker 镜像说明(Samba 文件共享(crazymax),适合 SMB 网络存储与文件共享)

镜像拉取方式

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

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

docker pull docker.xuanyuan.run/instantlinux/samba-dc:<标签>

使用方法:

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

DockerHub 原生拉取命令

docker pull instantlinux/samba-dc:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · iKuai 镜像加速

宝塔面板

一键配置镜像源

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

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

专属域名用法

专属域名 · 开启停用 · 多仓库

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

docker.sock / daemon

账号

失败是否计费

manifest · blob · 计费

申请开票(企业 / 个人)

开票 · 发票 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
instantlinux/samba-dc
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥8/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 samba-dc 镜像推荐

instantlinux/nut-upsd logo

instantlinux/nut-upsd

instantlinux
Alpine容器中的网络UPS工具(nut)包,支持amd64/arm64/arm32架构,可实现UPS设备的Nagios监控。
45 次收藏100万+ 次下载
1 个月前更新
instantlinux/ez-ipupdate logo

instantlinux/ez-ipupdate

instantlinux
动态DNS客户端,自动将公共DNS名称更新为动态IP地址,适用于Kubernetes或Docker Swarm环境确保持续运行。
100万+ 次下载
1 个月前更新
instantlinux/spamassassin logo

instantlinux/spamassassin

instantlinux
这是一个包含pyzor、razor2和dcc的SpamAssassin镜像,支持容器启动时自动初始化razor2,并可通过cron调度规则定期更新。
2 次收藏50万+ 次下载
7 个月前更新
instantlinux/proftpd logo

instantlinux/proftpd

instantlinux
一个易用、轻量且功能齐全的ProFTPD安装,支持FTP和SFTP,可通过环境变量快速配置,适合在Docker环境中部署文件传输服务。
11 次收藏10万+ 次下载
1 个月前更新
instantlinux/mysqldump logo

instantlinux/mysqldump

instantlinux
用于每日备份MySQL/MariaDB集群中的数据库的Docker镜像,基于MariaDB 10.3.x客户端,支持定时备份、自动清理旧备份,可在Kubernetes或docker-compose环境中部署。
1 次收藏10万+ 次下载
1 个月前更新
instantlinux/mythtv-backend logo

instantlinux/mythtv-backend

instantlinux
基于Ubuntu jammy (22.04)构建的MythTV后端,支持高可用性配置,确保不错过任何节目。
3 次收藏5万+ 次下载
1 个月前更新

查看更多 samba-dc 相关镜像