This repository was archived by the owner on Jan 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
1212 && apt-get -q -y clean \
1313 && rm -rf /var/lib/apt/lists/*
1414
15+ ENV DHCPD_PROTOCOL=4
16+
1517COPY util/entrypoint.sh /entrypoint.sh
1618ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
1212 && apt-get -q -y clean \
1313 && rm -rf /var/lib/apt/lists/*
1414
15+ ENV DHCPD_PROTOCOL=4
16+
1517COPY util/entrypoint.sh /entrypoint.sh
1618ENTRYPOINT ["/entrypoint.sh"]
Original file line number Diff line number Diff line change 3434A simple ` run ` script is also included which makes it quick to iterate on a
3535configuration until you're satisfied.
3636
37+ DHCPv6
38+ ------
39+
40+ To use a DHCPv6-Server you have to pass ` DHCPD_PROTOCOL=6 ` as enviroment variable
41+
42+ ` docker run -it --rm --init -e DHCPD_PROTOCOL=6 --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0 `
43+
44+
3745Notes
3846=====
3947
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ if [ -n "$IFACE" ]; then
6969 echo " You must add the 'docker run' option '--net=host' if you want to provide DHCP service to the host network."
7070 fi
7171
72- $run /usr/sbin/dhcpd -4 -f -d --no-pid -cf " $data_dir /dhcpd.conf" -lf " $data_dir /dhcpd.leases" $IFACE
72+ $run /usr/sbin/dhcpd -$DHCPD_PROTOCOL -f -d --no-pid -cf " $data_dir /dhcpd.conf" -lf " $data_dir /dhcpd.leases" $IFACE
7373else
7474 # Run another binary
7575 $run " $@ "
You can’t perform that action at this time.
0 commit comments