Skip to content

diegogslomp/samba-ad-dc

Repository files navigation

samba-ad-dc

dockerhub gh-actions gh-actions gh-actions gh-actions

Samba Active Directory Domain Controller Docker Image

  1. Provision a new domain
docker run -d --privileged \
  --restart=unless-stopped --network=host \
  -e REALM='SAMDOM.EXAMPLE.COM' \
  -e DOMAIN='SAMDOM' \
  -e ADMIN_PASS='Passw0rd' \
  -e DNS_FORWARDER='8.8.8.8' \
  -v dc1-samba:/usr/local/samba \
  --name dc1 --hostname DC1 diegogslomp/samba-ad-dc
  1. Show logs and run tests
docker logs dc1 -f
docker exec dc1 samba-tests
  1. For external access, update the /etc/resolv.conf and /etc/hosts from your host, replacing host_ip
# /etc/resolv.conf
search samdom.example.com
nameserver host_ip

# /etc/hosts
127.0.0.1     localhost
host_ip       DC1.samdom.example.com     DC1
  1. For multiple dc testing (no external access)
git clone --single-branch https://github.com/diegogslomp/samba-ad-dc
cd samba-ad-dc
docker compose build
docker compose up -d
docker compose logs -f
for dc in dc{1,2,3,4}; do docker compose exec $dc samba-tests; done
  1. To-Do
  1. Links