Skip to content

adevur/docker-centos-dhcpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

centos-dhcpd

This image lets you quickly setup a DHCPv4 server based on CentOS 7 and its dhcp package.

Building

To build, run:

docker build --tag=centos-dhcpd:latest .

Usage

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

Additional info

  • In order to start the DHCP server, this image uses the very same command described in the official systemd service unit of 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-pid
  • This image uses dumb-init as its init system.

About

A minimal DHCPv4 server based on CentOS 7.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published