Portal:Container/Image/dhcp-server
openSUSE dhcp-server Container Image
Description
This container image contains the latest dhcp-server package from openSUSE Tumbleweed. It can act as DHCPv4 or DHCPv6 server.
Location
- registry.opensuse.org/opensuse/dhcp-server
Configuration
This container image requires a local data directory, by default /srv/dhcp-server. The dhcpd.conf and/or dhcpd6.conf configuration file needs to be placed in this directory. The container will store the leases in this directory, too.
The following environment variables are supported:
- DHCPD_IP_PROTOCOL=[4|6] - IPv4 or IPv6?
- DHCPD_INTERFACES="if0 if1 ... ifN" - List of interfaces to listen on
Run
# podman run -d --rm --net host -v /srv/dhcp-server:/data --env DHCPD_INTERFACES="eth2" --name dhcp-server registry.opensuse.org/opensuse/dhcp-server:latest
With SELinux
With SELinux enabled(MicroOS default) the Podman-Volume Mount option Z is required. The Z option tells Podman to label the content with a private unshared label.
# podman run -d --rm --net host -v /srv/dhcp-server:/data:Z --env DHCPD_INTERFACES="eth2" --name dhcp-server registry.opensuse.org/opensuse/dhcp-server:latest
Reload Configuration
The ISC dhcp server implementatin does not support reloading of configuration files.
Systemd support
The package containers-systemd contains a service file and sysconfig file to configure and automatically start the container with systemd.
# systemctl start container-dhcp-server # systemctl start container-dhcp6-server