easily spin up a docker instance of a dhcp server. usefull for connecting to a headless raspberry pi.
i use network manager
and my main ethernet interface on my thinkpad is named net0
-
make sure you have net0 interface up with a defined static address.
nmcli connection up net0\ STATIC\ [192.168.0.1]
-
define the dhcp.conf in the /data dir with a lease pool in the range of the defined network interface above.
-
now.. you can launch the dhcp server using the below command.
docker run -it --rm --init --net host -v "$PWD"/data:/data networkboot/dhcpd net0
search hub.docker.com for networkboot/dhcpd