Skip to content

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

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

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.

@ladydd

ladydd commented Nov 26, 2026

Copy link
Copy Markdown
Author

Closing this. The docs note landed in docker-library/docs#2722, and we're not pursuing a runtime warning.

@ladydd ladydd closed this Nov 26, 2026
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