mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2025-08-07 22:57:29 +02:00
proxydhcp - get container IP differently
This commit is contained in:
parent
b326528269
commit
7c933236a0
@ -25,7 +25,7 @@ if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then
|
||||
|
||||
# Get the container's IP address using hostname if not already set
|
||||
if [ -z "${CONTAINER_IP}" ]; then
|
||||
CONTAINER_IP=$(hostname -i)
|
||||
CONTAINER_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||
export CONTAINER_IP
|
||||
fi
|
||||
envsubst '${DHCP_RANGE_START} ${CONTAINER_IP}' </defaults/dnsmasq-dhcpproxy.conf >>/config/dnsmasq/dnsmasq.conf
|
||||
|
Loading…
Reference in New Issue
Block a user