From f412580a4a35c749f9c46b2f8ac19f973e9104d3 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 7 Feb 2024 22:26:29 +0100 Subject: [PATCH] feat: Add DNS entry for container (#624) --- src/network.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/network.sh b/src/network.sh index d6b5337..fc15b66 100644 --- a/src/network.sh +++ b/src/network.sh @@ -80,9 +80,13 @@ configureDNS() { # Set DNS server and gateway DNSMASQ_OPTS="$DNSMASQ_OPTS --dhcp-option=option:dns-server,${VM_NET_IP%.*}.1 --dhcp-option=option:router,${VM_NET_IP%.*}.1" - DNSMASQ_OPTS=$(echo "$DNSMASQ_OPTS" | sed 's/\t/ /g' | tr -s ' ' | sed 's/^ *//') + # Add DNS entry for container + DNSMASQ_OPTS="$DNSMASQ_OPTS --address=/host.local/${VM_NET_IP%.*}.1" + + DNSMASQ_OPTS=$(echo "$DNSMASQ_OPTS" | sed 's/\t/ /g' | tr -s ' ' | sed 's/^ *//') [[ "$DEBUG" == [Yy1]* ]] && set -x + if ! $DNSMASQ ${DNSMASQ_OPTS:+ $DNSMASQ_OPTS}; then error "Failed to start dnsmasq, reason: $?" && exit 29 fi