Web lists-archives.com

Re: [Samba] running a (secondary) samba DC as docker container

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 \

Mounting these three volumes allow you to be able to recreate the container at any time and reuse the important Samba persistent data

To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba