A minimal DHCPv4 server based on CentOS 7.
10K+
This image lets you quickly setup a DHCPv4 server based on CentOS 7 and its dhcp package.
To build, run:
docker build --tag=centos-dhcpd:latest .
You need to have a directory in your system that contains the configuration files for the DHCP server. This folder will be mounted as /etc/dhcp inside the container. For example /home/john/dhcp-config, in which you can place a file, /home/john/dhcp-config/dhcpd.conf, that contains your DHCP server configuration.
To run the container:
docker run --rm -d --network host -v /home/john/dhcp-config:/etc/dhcp --name dhcpd adevur/centos-dhcpd
If you want to start the DHCP server automatically on boot:
docker run --rm --restart always -d --network host -v /home/john/dhcp-config:/etc/dhcp --name dhcpd adevur/centos-dhcpd
dhcp package. This unit can be found at: /lib/systemd/system/dhcpd.service, the command is: /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-piddumb-init as its init system.Content type
Image
Digest
Size
86.2 MB
Last updated
over 7 years ago
docker pull adevur/centos-dhcpd