[Samba] running a (secondary) samba DC as docker container
Stefan G. Weichinger
lists at xunil.at
Mon Sep 3 15:05:33 UTC 2018
Am 03.09.18 um 15:12 schrieb Robert Marcano via samba:
> On 09/03/2018 04:10 AM, Stefan G. Weichinger via samba wrote:
>> As I am learning docker lately I came to the idea of using a docker
>> container as a "fallback" DC at sites where there is no budget (or
>> understanding) for a 2nd physical DC.
>> That 2nd DC *might* run as docker container alongside the
>> DM/fileserver, right? OK, it should get a separate IP, I assume etc
>> Aside from the details: does anyone here actually do that?
> Greetings, I am running 3 domains on customer sites, inside containers.
> There are a few tips:
> 1. Add a new dedicated IP to use by the container
> 2. Run the container with host networking
> 3. Run the container in privileged mode. It should probably run without
> this but some permissions may be needed to be granted, That is a big
> TODO for me.
> 4. On the container instance smb.conf, remember so set:
> interfaces = <public IP>
> bind interfaces only = Yes
> 5. I am using the internal DNS but it should work too with Bind.
> I create my container instances this way (I use podman for simplicity,
> but it works on docker too)
> podman create --privileged \
> --network host \
> -v /srv/samba/samba-ad/etc:/etc/samba:Z \
> -v /srv/samba/samba-ad/data:/var/lib/samba:Z \
> -v /srv/samba/samba-ad/log:/var/log/samba:Z \
> --hostname dc.example.com \
> --name samba-ad \
> --dns 127.0.0.1 \
> Mounting these three volumes allow you to be able to recreate the
> container at any time and reuse the important Samba persistent data
great, thanks! Which docker image do you use as base image?
That info seems to miss from your cut-and-paste ;-)
More information about the samba