Skip to content

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Sep 25, 2025

When running in rootful mode, reserve the ports on the host so that the ports appears on /proc/net/tcp.

This also prevents other processes from binding to the same ports.

Note that in rootless mode this is not necessary because RootlessKit's port driver already reserves the ports.

See:

Similar patterns are used in Docker and Podman.

@AkihiroSuda AkihiroSuda force-pushed the rootful-reserve-port branch 3 times, most recently from 987c361 to c901c76 Compare September 26, 2025 18:00
@AkihiroSuda AkihiroSuda changed the title [WIP] rootful: reserve the ports on the host rootful: reserve the ports on the host Sep 26, 2025
@AkihiroSuda AkihiroSuda added this to the v2.1.6 milestone Sep 26, 2025
@AkihiroSuda

This comment was marked as resolved.

@AkihiroSuda AkihiroSuda force-pushed the rootful-reserve-port branch 2 times, most recently from d45bb18 to 3eca813 Compare September 29, 2025 08:35
When running in rootful mode, reserve the ports on the host
so that the ports appears on /proc/net/tcp.

This also prevents other processes from binding to the same ports.

Note that in rootless mode this is not necessary because
RootlessKit's port driver already reserves the ports.

See lima-vm/lima issue 4085

Similar patterns are used in Docker and Podman.
- moby/moby PR 48132
- containers/podman PR 23446

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda marked this pull request as ready for review September 29, 2025 09:37
@AkihiroSuda AkihiroSuda requested a review from ktock September 29, 2025 09:42
@AkihiroSuda AkihiroSuda mentioned this pull request Sep 29, 2025
@AkihiroSuda AkihiroSuda merged commit ce40996 into containerd:main Sep 29, 2025
71 of 76 checks passed
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.

2 participants