Sign inSign up

claymore666/net-dhcp

By claymore666

•Updated 4 minutes ago

DHCP-leased IPs for Docker containers (bridge/macvlan/ipvlan). Fork of devplayer0/docker-net-dhcp.

Plugin
Image
Networking
Security
Monitoring & observability
0

2.7K

claymore666/net-dhcp repository overview

⁠net-dhcp

Docker network plugin that gets each container's IP from your existing
LAN DHCP server (e.g. your router) instead of from a Docker-managed
pool. Containers appear on the LAN like any other host.

This is a maintained fork of
devplayer0/docker-net-dhcp⁠.
All credit for the original design and bridge-mode plumbing goes to the
upstream author. The upstream has been quiet since 2021 and no longer
builds on current Docker; this fork carries the work forward.

⁠Install

  docker plugin install claymore666/net-dhcp:latest                                                                                                                                                                                     
                                                                             

Also published on GHCR as ghcr.io/claymore666/docker-net-dhcp:latest.

⁠What this fork changes vs upstream

  • Modernised toolchain: Go 1.25, current Docker SDK (v28), current Alpine.
  • New mode=macvlan — attaches directly to a parent NIC, no host bridge required.
  • New mode=ipvlan — for switches that reject macvlan's per-child MACs.
  • Daemon-restart deadlock fixed (per-network options now persisted to disk).
  • MAC + IP stability across docker restart and systemctl restart docker
    via a 60s tombstone mechanism.
  • Static-IP override: --driver-opt ip=192.168.X.Y per endpoint.
  • Internal data-race fixes surfaced by go test -race.
  • Selected upstream PRs incorporated (skip-routes, conflict-detection bypass, IPv6).
  • Live integration test gate on every PR — full lifecycle, recovery,
    concurrency. ~70% coverage of production code paths.

⁠Usage

Bridge mode (drop-in upstream-compatible):

  docker network create -d claymore666/net-dhcp:latest \                                                                                                                                                                                
      --ipam-driver null -o bridge=my-bridge my-dhcp-net                                                                                                                                                                              
                                                                                                                                                                                                                                        

Macvlan mode (no host bridge needed):

  docker network create -d claymore666/net-dhcp:latest \                                                                                                                                                                              
      --ipam-driver null -o mode=macvlan -o parent=eth0 lan-dhcp                                                                                                                                                                        
                                                                                                                                                                                                                                        

In compose:

  services:                                                                                                                                                                                                                           
    app:                                                                     
      image: nginx                                  
      networks: [lan-dhcp]                                                                                                                                                                                                              
  networks:
    lan-dhcp:                                                                                                                                                                                                                           
      external: true                                                                                                                                                                                                                  
                                                                             

⁠License

GPL-3.0, matching upstream. All upstream copyright notices preserved.

Tag summary

Content type

Plugin

Digest

sha256:f3393c611…

Size

13.5 MB

Last updated

2 days ago

docker plugin install claymore666/net-dhcp