Active Directory Domain Controller by samba4 on Alpine Linux
6.8K
Some parts are collected from:
Without any config and thrown away when terminated:
docker run -it --rm babim/sambaad
docker run --rm -i -t \
-e SAMBA_REALM="samba.lan" \
-e SAMBA_DOMAIN="samba" \
-e SAMBA_PASSWORD="Password1!" \
-e SAMBA_HOST_IP="192.168.1.10" \
-e SAMBA_DNS_FORWARDER="192.168.1.1" \
-v ${PWD}/samba:/var/lib/samba \
-h addomain \
babim/sambaad
Production deploy
docker run -h addomain -d \
-e SAMBA_REALM="samba.lan" \
-e SAMBA_DOMAIN="samba" \
-e SAMBA_PASSWORD="Password1!" \
-e SAMBA_HOST_IP="192.168.1.10" \
-e SAMBA_DNS_FORWARDER="192.168.1.1" \
-v ${PWD}/libsamba:/var/lib/samba \
-v ${PWD}/krb5kdc:/var/lib/krb5kdc \
-v ${PWD}/etcsamba:/etc/samba \
--name addomain --privileged --network=host \
babim/sambaad
Environment variables are controlling the way how this image behaves therefore please check this list an explanation:
$(pwgen -cny 10 1)The first time you start the container, a setup-script will run and provision the domain controller using the supplied environment variables. After the setup has finished successfully, the container will continue starting (unless SAMBA_SETUP_ONLY is set) and start the domain controller.
The container saves all necessary files within /var/lib/samba. See the following examples on how to start/setup the domain controller and how to persist this volume.
Using (or reusing data) is done by providing
/var/lib/samba/private/smb.conf/etc/krb5.conf > link to /var/lib/samba/private/krb5.conf/usr/lib/samba//var/lib/krb5kdc//etc/samba/as volumes to the docker container.
Content type
Image
Digest
Size
57.3 MB
Last updated
about 8 years ago
docker pull babim/sambaad