From f87291d0f868840a5c07f13aa701413ad3801301 Mon Sep 17 00:00:00 2001 From: thorus90 Date: Fri, 30 Sep 2022 00:13:10 +0200 Subject: [PATCH] issue-69 adds an chrony server to samba-dc to provide NTP for windows clients --- images/samba-dc/Dockerfile | 3 ++- images/samba-dc/chrony.conf | 8 ++++++++ images/samba-dc/entrypoint.sh | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 images/samba-dc/chrony.conf diff --git a/images/samba-dc/Dockerfile b/images/samba-dc/Dockerfile index b97ea6a3..6e6a564b 100644 --- a/images/samba-dc/Dockerfile +++ b/images/samba-dc/Dockerfile @@ -28,8 +28,9 @@ ARG SAMBA_VERSION=4.15.7-r0 COPY *.conf.j2 /root/ COPY entrypoint.sh /usr/local/bin/ +COPY chrony.conf /etc/chrony/ RUN apk add --update --no-cache krb5 ldb-tools samba-dc=$SAMBA_VERSION tdb \ - bind bind-libs bind-tools libcrypto1.1 libxml2 tzdata && \ + bind bind-libs bind-tools libcrypto1.1 libxml2 tzdata chrony && \ chmod 0755 /usr/local/bin/entrypoint.sh VOLUME /etc/samba /var/lib/samba diff --git a/images/samba-dc/chrony.conf b/images/samba-dc/chrony.conf new file mode 100644 index 00000000..f203185c --- /dev/null +++ b/images/samba-dc/chrony.conf @@ -0,0 +1,8 @@ +pool pool.ntp.org iburst +initstepslew 10 pool.ntp.org +driftfile /var/lib/chrony/chrony.drift +rtcsync +cmdport 0 + +allow all +ntpsigndsocket /var/lib/samba/ntp_signd/socket \ No newline at end of file diff --git a/images/samba-dc/entrypoint.sh b/images/samba-dc/entrypoint.sh index 8f0aa11a..6abd2d6c 100755 --- a/images/samba-dc/entrypoint.sh +++ b/images/samba-dc/entrypoint.sh @@ -63,4 +63,5 @@ for file in $(ls -A /etc/samba/conf.d/*.conf); do done ln -fns /var/lib/samba/private/krb5.conf /etc/ +chronyd -4 -d & exec samba --model=$MODEL -i