Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/samba/Dockerfile.dnsmasq
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM opensuse/leap:15.6 AS ref_repo

RUN zypper --non-interactive mr -e -a &&\
zypper --non-interactive --gpg-auto-import-keys ref --force && \
zypper --non-interactive in hostname vim tcpdump iputils iproute2 dnsmasq

COPY examples/samba/dnsmasq.conf /etc/dnsmasq.conf
COPY examples/samba/dnsmasq-hosts.conf /etc/dnsmasq-hosts.conf
COPY examples/samba/entrypoint.dnsmasq /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
SHELL ["/bin/bash", "--login", "-c"]
CMD ["/bin/bash", "--login"]

# Added as part of the pkg install
USER dnsmasq
WORKDIR /var/lib/empty

EXPOSE 53/tcp
EXPOSE 53/udp
6 changes: 6 additions & 0 deletions examples/samba/dnsmasq-hosts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

192.168.66.215 krimedc.example.com
192.168.66.215 samba.example.com



17 changes: 17 additions & 0 deletions examples/samba/dnsmasq.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

log-queries

addn-hosts=/etc/dnsmasq-hosts.conf

server=192.168.66.1

# Quad 9 fallback
# server=9.9.9.11
# server=149.112.112.11

srv-host =_kerberos._tcp.example.com,krimedc.example.com,88
srv-host =_kerberos-master._tcp.example.com,krimedc.example.com,88
txt-record=_kerberos.example.com,"EXAMPLE.COM"



26 changes: 21 additions & 5 deletions examples/samba/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ services:
networks:
static-network:
ipv4_address: 192.168.238.10
expose:
- "88"
- "88/udp"
ports:
- "88:88"

samba:
depends_on:
Expand All @@ -51,8 +50,25 @@ services:
networks:
static-network:
ipv4_address: 192.168.238.11
expose:
- "445"
ports:
- "445:445"

dnsmasq:
restart: no
build:
context: ../../
dockerfile: ./examples/samba/Dockerfile.dnsmasq
image: libkrimes:dnsmasq
container_name: libkrimes_dnsmasq
hostname: dnsmasq
domainname: example.com
dns_search: example.com
networks:
static-network:
ipv4_address: 192.168.238.12
ports:
- "53:53/tcp"
- "53:53/udp"

volumes:
samba-keytab:
Expand Down
7 changes: 7 additions & 0 deletions examples/samba/entrypoint.dnsmasq
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

/usr/sbin/dnsmasq --log-async --log-facility=- --keep-in-foreground --conf-file=/etc/dnsmasq.conf


Binary file added examples/samba/krbtgt.keytab
Binary file not shown.
Loading