You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone landing here looking for an actively maintained version of
this plugin: I've published a fork at https://github.com/claymore666/docker-net-dhcp that brings the codebase
forward and adds a macvlan attachment mode.
I'm posting this as an issue rather than a PR because I'm not asking
for a merge — the upstream repository has been quiet for a few years
and several useful PRs (#43, #34, #32, #31, the dependabot bumps) have
been waiting on review. The fork incorporates the substance of the
PRs that still apply, with attribution to their original authors in
the commit messages.
What's in the fork
Modernization. Go 1.16 → 1.25, alpine 3.14 → current,
github.com/docker/docker v20.10.7 → v28, plus the rest of the
dependency tree. Updated for the v28 package split
(api/types/network, api/types/container, NewClientWithOpts +
API version negotiation). Builds and runs on current Docker hosts.
New `mode=macvlan` attachment. Containers get a macvlan child of
a host NIC and pull a DHCP lease from the LAN — no host bridge
required, no per-container plumbing, no static IPs. `bridge` mode
is unchanged and remains the default.
Daemon-restart deadlock fix. Per-network options are persisted
to disk so per-endpoint handlers don't have to call back into the
docker API. Inspired by @aczwink's earlier fix in their fork.
Tested on Linux x86_64 with Docker 26.1.5 against an AVM Fritz.Box
DHCP server. Multi-container, lease-renewal, and DHCPRELEASE-on-stop
flows verified. Bridge mode behaviour unchanged from upstream.
Happy to keep this fork alive. If @devplayer0 ever wants to pick the
project back up I'll happily rebase or send PRs upstream.
For anyone landing here looking for an actively maintained version of
this plugin: I've published a fork at
https://github.com/claymore666/docker-net-dhcp that brings the codebase
forward and adds a macvlan attachment mode.
I'm posting this as an issue rather than a PR because I'm not asking
for a merge — the upstream repository has been quiet for a few years
and several useful PRs (#43, #34, #32, #31, the dependabot bumps) have
been waiting on review. The fork incorporates the substance of the
PRs that still apply, with attribution to their original authors in
the commit messages.
What's in the fork
github.com/docker/docker v20.10.7 → v28, plus the rest of the
dependency tree. Updated for the v28 package split
(
api/types/network,api/types/container,NewClientWithOpts+API version negotiation). Builds and runs on current Docker hosts.
a host NIC and pull a DHCP lease from the LAN — no host bridge
required, no per-container plumbing, no static IPs. `bridge` mode
is unchanged and remains the default.
to disk so per-endpoint handlers don't have to call back into the
docker API. Inspired by @aczwink's earlier fix in their fork.
Support 'gateway' option when creating network #32 `gateway` override option (@Vigilans), and the modernization
intent of [Fix] Bump packages, remove hardcoded API version. #43 (@relet).
Install
```bash
docker plugin install ghcr.io/claymore666/docker-net-dhcp:v0.3.0
```
(Or build from source — see the Makefile.)
Status
Tested on Linux x86_64 with Docker 26.1.5 against an AVM Fritz.Box
DHCP server. Multi-container, lease-renewal, and DHCPRELEASE-on-stop
flows verified. Bridge mode behaviour unchanged from upstream.
Happy to keep this fork alive. If @devplayer0 ever wants to pick the
project back up I'll happily rebase or send PRs upstream.