Skip to content

Warn when dind starts in a netns where another dockerd already manages iptables - #595

Open
ladydd wants to merge 1 commit into
docker-library:masterfrom
ladydd:warn-shared-netns
Open

ladydd wants to merge 1 commit into
docker-library:masterfrom
ladydd:warn-shared-netns

Conversation

@ladydd

@ladydd ladydd commented Nov 24, 2026

Copy link
Copy Markdown

Closes #594

Just a warning, no behavior change. If the DOCKER chain already exists before our dockerd starts, some other daemon is managing iptables in this netns (almost always --network=host next to a host Docker), and starting will wipe its rules.

Only checked for root. Rootless goes through rootlesskit with its own netns, so it isn't affected.

Tested with docker:29-dind and the script mounted over the entrypoint:

  • default (own netns): no warning, daemon comes up as before
  • iptables -N DOCKER before the entrypoint: both warning lines printed, daemon still comes up

29/dind/dockerd-entrypoint.sh is the copy from apply-templates.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dind with --network=host silently wipes the host daemon's iptables rules

1 participant