I have done the following
1. Steps to reproduce
- Attempt to bind host port 80 explicitly to
127.0.0.1:
container run --rm -p 127.0.0.1:80:80/tcp hello-world
Output: Error: failed to bootstrap container ... Permission denied while binding to host port 80. Binding to ports below 1024 requires root privileges.
- Attempt to bind host port 80 to
0.0.0.0 or without an explicit host IP:
container run --rm -p 0.0.0.0:80:80/tcp hello-world
# or
container run --rm -p 80:80/tcp hello-world
Output: Hello from Docker! (Succeeds)
- Attempt to run with
sudo to bypass the 127.0.0.1:80 error:
sudo container run --rm -p 127.0.0.1:80:80/tcp hello-world
Output: Error: unauthorized request
2. Problem description
- Binding host port
< 1024 with 127.0.0.1 throws a permission validation error requiring root privileges.
- Binding host port
< 1024 with 0.0.0.0 or implicitly (-p 80:80) succeeds as a standard non-root user.
- Executing with
sudo fails with unauthorized request due to a daemon UID mismatch (client_euid=0 vs server_euid=501).
3. Expected Behavior
Port binding validation for privileged ports (< 1024) should be consistent regardless of whether a specific host IP (127.0.0.1) or wildcard IP (0.0.0.0) is specified. Binding to 127.0.0.1:80 as a standard user should succeed just as -p 80:80 and -p 0.0.0.0:80:80 do.
4. System Logs (container system logs)
2026-07-22 15:23:33.032990+0700 0x5ce44a Error 0x0 43573 0 container-apiserver: [com.apple.container:APIServer] route handler threw an error [route=containerBootstrap] [error=internalError: "failed to bootstrap container 116a41dd-3486-4772-a76c-4cd6512663c6" (cause: "invalidArgument: "Permission denied while binding to host port 80. Binding to ports below 1024 requires root privileges."")]
2026-07-22 15:23:33.034473+0700 0x5ce468 Info 0x0 43573 0 container-apiserver: [com.apple.container:APIServer] ContainersService: enter [id=116a41dd-3486-4772-a76c-4cd6512663c6] [func=delete(id:force:)] [force=false]
2026-07-22 15:23:34.794230+0700 0x5cefc5 Error 0x0 43573 0 container-apiserver: [com.apple.container:APIServer] unauthorized request - uid mismatch [client_euid=0] [server_euid=501]
5. Environment
- OS: macOS 26.5.2 (Build 25F84)
- Xcode: Not installed
- Container: container CLI version 1.1.0 (build: release)
Code of Conduct
I have done the following
1. Steps to reproduce
127.0.0.1:Output:
Error: failed to bootstrap container ... Permission denied while binding to host port 80. Binding to ports below 1024 requires root privileges.0.0.0.0or without an explicit host IP:container run --rm -p 0.0.0.0:80:80/tcp hello-world # or container run --rm -p 80:80/tcp hello-worldOutput:
Hello from Docker!(Succeeds)sudoto bypass the127.0.0.1:80error:Output:
Error: unauthorized request2. Problem description
< 1024with127.0.0.1throws a permission validation error requiring root privileges.< 1024with0.0.0.0or implicitly (-p 80:80) succeeds as a standard non-root user.sudofails withunauthorized requestdue to a daemon UID mismatch (client_euid=0vsserver_euid=501).3. Expected Behavior
Port binding validation for privileged ports (< 1024) should be consistent regardless of whether a specific host IP (
127.0.0.1) or wildcard IP (0.0.0.0) is specified. Binding to127.0.0.1:80as a standard user should succeed just as-p 80:80and-p 0.0.0.0:80:80do.4. System Logs (
container system logs)5. Environment
Code of Conduct