Sign inSign up

jchonig/dhcpd

By jchonig

•Updated 1 day ago

Run ISC DHCP server in a container

Image
0

4.3K

jchonig/dhcpd repository overview

⁠docker-dhcpd

A container running ISC DHCP Server⁠.

Image hosted at: ghcr.io/jchonig/dhcpd

⁠Usage

⁠docker

docker create \
  --name=dhcpd \
  -e TZ=Europe/London \
  -i DHCP_IF=eth0 \
  --net host \
  --ports 69/udp \
  --restart unless-stopped \
  -v ./config:/config \
  -v ./data:/data \
  ghcr.io/jchonig/dhcpd
⁠docker-compose

Compatible with docker-compose v2 schemas.

---
version: "2"
services:
  monit:
    image: ghcr.io/jchonig/dhcpd
    container_name: dhcpd
    environment:
      - TZ=Europe/London
	  - DHCP_IF=eth0
    volumes:
      - </path/to/appdata/config>:/config
	  - dhcpd_data:/data
	network_mode: host
    ports:
      - 69
    restart: unless-stopped

...

volumes:
  dhcpd_data

⁠Parameters

⁠Ports (--expose)

PortFunction
69/udpDHCPD port
547/udpDHCPv6 port
647/tcpDHCPD failover port

⁠Environment Variables (-e)

EnvFunction
PUID=1000for UserID
PGID=1000for GroupID
TZ=UTCSpecify a timezone to use, e.g. UTC
DHCP_IF=Default interface for isc-dhcp-server
DHCP_V6=Set to true to run DHCPv6 instead of DHCPv4

⁠Volume Mappings (-v)

VolumeFunction
/configAll the config files reside here
/dataPersistent volume containing the leases file

⁠Application Setup

  • Environment variables can also be passed in a file named env in the config directory. This file is sourced by the shell.
  • /config will be monitored for changes. Then these occur, the dhcp-server daemon will be restarted.

Tag summary

Content type

Image

Digest

sha256:ce32f0202…

Size

71 MB

Last updated

1 day ago

docker pull jchonig/dhcpd