Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.
Merged
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
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
&& apt-get -q -y clean \
&& rm -rf /var/lib/apt/lists/*

ENV DHCPD_PROTOCOL=4

COPY util/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 2 additions & 0 deletions Dockerfile.ldap
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
&& apt-get -q -y clean \
&& rm -rf /var/lib/apt/lists/*

ENV DHCPD_PROTOCOL=4

COPY util/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ on.
A simple `run` script is also included which makes it quick to iterate on a
configuration until you're satisfied.

DHCPv6
------

To use a DHCPv6-Server you have to pass `DHCPD_PROTOCOL=6` as enviroment variable

`docker run -it --rm --init -e DHCPD_PROTOCOL=6 --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0`


Notes
=====

Expand Down
2 changes: 1 addition & 1 deletion util/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if [ -n "$IFACE" ]; then
echo "You must add the 'docker run' option '--net=host' if you want to provide DHCP service to the host network."
fi

$run /usr/sbin/dhcpd -4 -f -d --no-pid -cf "$data_dir/dhcpd.conf" -lf "$data_dir/dhcpd.leases" $IFACE
$run /usr/sbin/dhcpd -$DHCPD_PROTOCOL -f -d --no-pid -cf "$data_dir/dhcpd.conf" -lf "$data_dir/dhcpd.leases" $IFACE
else
# Run another binary
$run "$@"
Expand Down