# Container Port Mapping Issue

**URL:** <https://forums.docker.com/t/container-port-mapping-issue/150171>\
**Category:** Docker Desktop\
**Tags:** windows\
**Created:** [October 18, 2025, 4:34am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171 "2025-10-18T04:34:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 18, 2025, 4:34am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/1 "2025-10-18T04:34:27Z")

</div>

I am encountering a port mapping issue when running SQL Server 2025 container with Docker. After the container starts, the port mapping displays incorrectly, preventing me from connecting to the SQL Server instance over the network.​

Environment Information​

- Docker Desktop version: latest
- Operating System: Windows 11 Pro
- SQL Server image: `mcr.microsoft.com/mssql/server:2025-latest` or `mcr.microsoft.com/mssql/server:2022-latest`

**Reproduction Steps**

1. Pull SQL Server 2025 image

2. Create and run SQL Server container

**Issue**

When container is not running: in Docker Desktop’s containers page, the ports column correctly shows 1433:1433​

After container starts:

| CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES |
| --- | --- | --- | --- | --- | --- | --- |
| 9b52f30b0025 | [Microsoft Artifact Registry](http://mcr.microsoft.com/mssql/server:2025-latest) | “/opt/mssql/bin/laun…” | 6 minutes ago | Up 6 minutes | 1433/tcp | sqlserver​ |

Docker Desktop’s ports column becomes empty.

Running `docker ps` command, the PORTS column shows 1433/tcp instead of the expected 0.0.0.0:1433-\>1433/tcp

Docker inspect results:

```json
"PortBindings": {
    "1433/tcp": [
        {
            "HostIp": "",
            "HostPort": "1433"
        }
    ]
},
"Ports": {
    "1433/tcp": null
}

```

**Expected Behavior**

I expect the port mapping to show `0.0.0.0:1433->1433/tcp`, allowing me to connect to the SQL Server instance via `localhost:1433` or `127.0.0.1:1433`.

**Troubleshooting attempts**

1. Stopped and restarted the container
2. Deleted and recreated the container
3. Checked if port 1433 is occupied on the host (confirmed it’s not)
4. Tried different port mappings (e.g., -p 1434:1433), issue persists
5. Restarted Docker service
6. Reinstall Docker

**Network configuration check**

1. Container network mode: bridge (default)
2. Cannot connect to SQL Server through port 1433

**Additional Information**

1. Container logs show SQL Server starts normally
2. Firewall is configured to allow traffic on port 1433
3. Other containers is normal

Supplement:

exec `docker network inspect bridge`

```json
[
    {
        "Name": "bridge",
        "Id": "3824b3449e381553bc97e49a458f93cc4d2b636be59bc90010ed827a516cb664",
        "Created": "2025-10-17T12:09:36.959047771Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv4": true,
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "9b52f30b0025563994e308e88c46f5b36a45ff625bbc770c94159f93eefb853d": {
                "Name": "sqlserver",
                "EndpointID": "e33ebe754cfd927c85338ef5fdb9e45f2cb5122c61ada03df1b348b4d4446677",
                "MacAddress": "b2:3e:f6:53:44:96",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]

```

Has anyone encountered a similar issue, or knows how to resolve this port mapping problem? Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![thenickward](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/thenickward/32/54416_2.png) [@thenickward](https://forums.docker.com/u/thenickward)\
**Post date:** [October 18, 2025, 5:49am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/2 "2025-10-18T05:49:20Z")

</div>

Could be that sql server inside the container’s only listening on 127.0.0.1 instead of 0.0.0.0. It should make the port mapping disappear even when docker says it’s exposed.

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [October 18, 2025, 9:45am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/3 "2025-10-18T09:45:59Z")

</div>

Your output doesn’t look right. It almost looks like the output for `.HostConfig.PortBindings` is not from the same container as `.NetworkSettings.Ports`. While the first is indeed what you see when a port is published, the second is what you see when a host is set to EXPOSE in the Dockerfile, but no port is published for this container port..

This is how both values look if they are from the same container:

## with port mapping

```auto
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
docker rm -f sqlserver

```

output:

```auto
PS C:\Users\metin> docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
fe2a280c4e1f63ec406c41649f41a0fd9c5f322bfb307d4300b913c79c6a75a9
PS C:\Users\metin> docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
{"1433/tcp":[{"HostIp":"","HostPort":"1433"}]}
PS C:\Users\metin> docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
{"1433/tcp":[{"HostIp":"0.0.0.0","HostPort":"1433"},{"HostIp":"::","HostPort":"1433"}]}
PS C:\Users\metin> docker rm -f sqlserver
sqlserver

```

## without portmapping

```auto
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
docker rm -f sqlserver

```

output:

```auto
PS C:\Users\metin> docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
8508a0301a28f005393401424fc6a7a2935437b27326cd31041f1ac9695699cd
PS C:\Users\metin> docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
{}
PS C:\Users\metin> docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
{"1433/tcp":null}
PS C:\Users\metin> docker rm -f sqlserver
sqlserver

```

Tested on Docker Desktop 4.48.0.

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [October 18, 2025, 9:53am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/4 "2025-10-18T09:53:11Z")

</div>

> [@thenickward](#):
>
> Could be that sql server inside the container’s only listening on 127.0.0.1 instead of 0.0.0.0

This can be easily tested with `docker run -it --net container:sqlserver nicolaka/netshoot netstat -tln`. The process inside the mssql contaier binds to `0.0.0.0:1433` and `:::1433`.

---

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 18, 2025, 11:57am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/5 "2025-10-18T11:57:46Z")

</div>

they are from the same container and test sql server inside the container’s

```bash
PS C:\Users\17233> docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
87a0dea6af6ff28c9736cd3ed0fb45bfb9ff0d9c953f9a352372690473dd512f
PS C:\Users\17233> docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
{"1433/tcp":[{"HostIp":"","HostPort":"1433"}]}
PS C:\Users\17233> docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
{"1433/tcp":[]}
PS C:\Users\17233> docker run -it --net container:sqlserver nicolaka/netshoot netstat -tln
Unable to find image 'nicolaka/netshoot:latest' locally
latest: Pulling from nicolaka/netshoot
b71379f7ad56: Pull complete
777b2eb9c233: Pull complete
8a84d69553b4: Pull complete
60a997354055: Pull complete
6825d4104fcf: Pull complete
9739e82eeb67: Pull complete
e3d67c957395: Pull complete
44718f283b64: Pull complete
4fe72e03ed63: Pull complete
1ffbfc3fee40: Pull complete
f97746911927: Pull complete
4f4fb700ef54: Pull complete
c48e6ef5a450: Pull complete
b402f437fea1: Pull complete
fe07684b16b8: Pull complete
Digest: sha256:7f08c4aff13ff61a35d30e30c5c1ea8396eac6ab4ce19fd02d5a4b3b5d0d09a2
Status: Downloaded newer image for nicolaka/netshoot:latest
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:135 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1431 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1434 0.0.0.0:* LISTEN
tcp 0 0 :::135 :::* LISTEN
tcp 0 0 :::1433 :::* LISTEN
tcp 0 0 ::1:1434 :::* LISTEN
tcp 0 0 ::1:1431 :::* LISTEN

```

---

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 18, 2025, 11:58am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/6 "2025-10-18T11:58:33Z")

</div>

@thenickward Please take a look too

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [October 18, 2025, 1:22pm UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/7 "2025-10-18T13:22:40Z")

</div>

Thank you for sharing the output!

The output of `.NetworkSettings.Ports` looks like if the port mapping configuration went missing somewhere.  
Are you using the latest Docker Desktop for Windows version as well?

I would suggest raising an issue in the GitHub project that tracks Docker Desktop for Windows issues:

> **[docker/for-win](https://github.com/docker/for-win/issues)**
>
> Bug reports for Docker Desktop for Windows. Contribute to docker/for-win development by creating an account on GitHub.

Can you try, if it makes a difference if a user defined bridge is used?

```auto
docker network create sqlserver
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d --network sqlserver mcr.microsoft.com/mssql/server:2025-latest

```

---

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 19, 2025, 7:17am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/8 "2025-10-19T07:17:35Z")

</div>

Thanks for the reply, the problem still exists after testing.

```bash
PS C:\Users\17233> docker network create sqlserver
b511854d85e74d3183955039e3c0370b013c5450e5141b75f711a2bd98f2f2b7
PS C:\Users\17233> docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d --network sqlserver mcr.microsoft.com/mssql/server:2025-latest
5ebbe578bee337092ec76056811eb083a43cfdf8d686cb06ae4bd9da53019cfe
PS C:\Users\17233> docker inspect --format '{{json .HostConfig.PortBindings}}' sqlserver
{"1433/tcp":[{"HostIp":"","HostPort":"1433"}]}
PS C:\Users\17233> docker inspect --format '{{json .NetworkSettings.Ports}}' sqlserver
{"1433/tcp":[]}
PS C:\Users\17233> docker run -it --net container:sqlserver nicolaka/netshoot netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:135 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.11:40419 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1431 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1434 0.0.0.0:* LISTEN
tcp 0 0 :::135 :::* LISTEN
tcp 0 0 ::1:1431 :::* LISTEN
tcp 0 0 ::1:1434 :::* LISTEN
tcp 0 0 :::1433 :::* LISTEN

```

I’m also going to GitHub to submit this issue.

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [October 19, 2025, 7:12pm UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/9 "2025-10-19T19:12:41Z")

</div>

> [@xiaofans](#):
>
> I’m also going to GitHub to submit this issue.

> <https://github.com/docker/for-win/issues/14961>
>
> \### Description
> 
> \> Original Community Forums Issue Link: 
> \>
> \> \[Container Port Ma…pping Issue\](https://forums.docker.com/t/container-port-mapping-issue/150171)
> 
> \## Issue Description
> 
> When running SQL Server 2025/2022 containers with Docker Desktop on Windows 11 Pro, a port mapping issue occurs. After the container starts, the port mapping does not display or function as expected, preventing network connections to the SQL Server instance. Port mapping works normally for other containers, ruling out global environment issues.
> 
> \## Environment Information
> 
> 
> 
> \* Docker Desktop Version: Latest
> 
> \* Operating System: Windows 11 Pro
> 
> \* SQL Server Image: \`mcr.microsoft.com/mssql/server:2025-latest\` or \`mcr.microsoft.com/mssql/server:2022-latest\`
> 
> \* Container Network Mode: Default bridge mode (custom bridge network tested later)
> 
> \## Reproduction Steps
> 
> 
> 
> 1. Pull the SQL Server image:
> 
> 
> 
> \`\`\`
> docker pull mcr.microsoft.com/mssql/server:2025-latest
> \`\`\`
> 
> 
> 
> 1. Create and run the container (with port mapping and volume):
> 
> 
> 
> \`\`\`
> docker run -e "ACCEPT\\\_EULA=Y" -e "MSSQL\\\_SA\\\_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d mcr.microsoft.com/mssql/server:2025-latest
> \`\`\`
> 
> \## Actual Issue
> 
> 
> 
> 1. \*\*Before container startup\*\*: The "Ports" column in Docker Desktop container list correctly shows \`1433:1433\`.
> 
> 2. \*\*After container startup\*\*:
> 
> \* The "Ports" column in Docker Desktop becomes empty;
> 
> \* \`docker ps\` shows \`1433/tcp\` in the PORTS column (expected: \`0.0.0.0:1433\`\`-\>1433/tcp\`);
> 
> \* Key \`docker inspect\` results:
> 
> 
> 
> \`\`\`
> // Port binding configuration exists
> 
> "HostConfig.PortBindings": {"1433/tcp":\\\[{"HostIp":"","HostPort":"1433"}\]}
> 
> // Port mapping result is empty
> 
> "NetworkSettings.Ports": {"1433/tcp":\\\[\]}
> \`\`\`
> 
> \## Supplementary Tests & Community Feedback
> 
> 
> 
> 1. \*\*Check listening address inside the container\*\* (per community user meyay's suggestion):
> 
> Tested with \`docker run -it --net container:sqlserver nicolaka/netshoot netstat -tln\`, results confirm SQL Server listens on \`0.0.0.0:1433\` and \`:::1433\` inside the container (ruling out "listening only on 127.0.0.1"):
> 
> 
> 
> \`\`\`
> Active Internet connections (only servers)
> 
> Proto Recv-Q Send-Q Local Address Foreign Address State
> 
> tcp 0 0 0.0.0.0:1433 0.0.0.0:\\\* LISTEN
> 
> tcp 0 0 :::1433 :::\\\* LISTEN
> \`\`\`
> 
> 
> 
> 1. \*\*Custom bridge network test\*\* (per community user meyay's suggestion):
> 
> Issue persists after using a custom network:
> 
> 
> 
> \`\`\`
> docker network create sqlserver
> 
> docker run -e "ACCEPT\\\_EULA=Y" -e "MSSQL\\\_SA\\\_PASSWORD=123456!Sa" -p 1433:1433 -v sqlvolume:/var/opt/mssql --name sqlserver -d --network sqlserver mcr.microsoft.com/mssql/server:2025-latest
> \`\`\`
> 
> Inspection results: \`HostConfig.PortBindings\` remains \`{"1433/tcp":\[{"HostIp":"","HostPort":"1433"}\]}\`, \`NetworkSettings.Ports\` remains \`{"1433/tcp":\[\]}\`.
> 
> \## Expected Behavior
> 
> The port mapping should display as \`0.0.0.0:1433\`\`-\>1433/tcp\`, allowing connections to the SQL Server instance via \`localhost:1433\` or \`127.0.0.1:1433\`.
> 
> \## Troubleshooting Attempts
> 
> 
> 
> \* Stopped/restarted the container, deleted/recreated the container (including re-pulling the image);
> 
> \* Checked host port 1433 occupancy (not occupied);
> 
> \* Tried other port mappings (e.g., \`-p 1434:1433\`), issue recurred;
> 
> \* Restarted Docker service and reinstalled Docker Desktop;
> 
> \* Checked default bridge network configuration (normal subnet, gateway, and container IP assignment);
> 
> \* Confirmed firewall allows port 1433 traffic, container logs show SQL Server starts normally;
> 
> \* Performed listening address check inside the container and custom bridge network test as suggested by the community (issue not resolved).
> 
> \## Help Request
> 
> Currently, only the SQL Server container has this issue. It is speculated that this may be related to image configuration or Docker's port handling logic for this specific image. Seeking further troubleshooting advice or confirmation if this is a known issue with Docker Desktop.
> 
> 
> 
> \### Reproduce
> 
> .
> 
> \### Expected behavior
> 
> \_No response\_
> 
> \### docker version
> 
> \`\`\`bash
> Client:
> Version: 28.5.1
> API version: 1.51
> Go version: go1.24.8
> Git commit: e180ab8
> Built: Wed Oct 8 12:19:16 2025
> OS/Arch: windows/amd64
> Context: desktop-linux
> 
> Server: Docker Desktop 4.48.0 (207573)
> Engine:
> Version: 28.5.1
> API version: 1.51 (minimum version 1.24)
> Go version: go1.24.8
> Git commit: f8215cc
> Built: Wed Oct 8 12:17:24 2025
> OS/Arch: linux/amd64
> Experimental: false
> containerd:
> Version: 1.7.27
> GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da
> runc:
> Version: 1.2.5
> GitCommit: v1.2.5-0-g59923ef
> docker-init:
> Version: 0.19.0
> GitCommit: de40ad0
> \`\`\`
> 
> \### docker info
> 
> \`\`\`bash
> Client:
> Version: 28.5.1
> Context: desktop-linux
> Debug Mode: false
> Plugins:
> ai: Docker AI Agent - Ask Gordon (Docker Inc.)
> Version: v1.9.11
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-ai.exe
> buildx: Docker Buildx (Docker Inc.)
> Version: v0.29.1-desktop.1
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-buildx.exe
> cloud: Docker Cloud (Docker Inc.)
> Version: v0.4.39
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-cloud.exe
> compose: Docker Compose (Docker Inc.)
> Version: v2.40.0-desktop.1
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-compose.exe
> debug: Get a shell into any image or container (Docker Inc.)
> Version: 0.0.44
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-debug.exe
> desktop: Docker Desktop commands (Docker Inc.)
> Version: v0.2.0
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-desktop.exe
> extension: Manages Docker extensions (Docker Inc.)
> Version: v0.2.31
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-extension.exe
> init: Creates Docker-related starter files for your project (Docker Inc.)
> Version: v1.4.0
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-init.exe
> mcp: Docker MCP Plugin (Docker Inc.)
> Version: v0.23.0
> Path: C:\\Users\\17233\\.docker\\cli-plugins\\docker-mcp.exe
> model: Docker Model Runner (Docker Inc.)
> Version: v0.1.42
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-model.exe
> sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
> Version: 0.6.0
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-sbom.exe
> scout: Docker Scout (Docker Inc.)
> Version: v1.18.3
> Path: C:\\Program Files\\Docker\\cli-plugins\\docker-scout.exe
> 
> Server:
> Containers: 4
> Running: 2
> Paused: 0
> Stopped: 2
> Images: 3
> Server Version: 28.5.1
> Storage Driver: overlayfs
> driver-type: io.containerd.snapshotter.v1
> Logging Driver: json-file
> Cgroup Driver: cgroupfs
> Cgroup Version: 2
> Plugins:
> Volume: local
> Network: bridge host ipvlan macvlan null overlay
> Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
> CDI spec directories:
> /etc/cdi
> /var/run/cdi
> Discovered Devices:
> cdi: docker.com/gpu=webgpu
> Swarm: inactive
> Runtimes: io.containerd.runc.v2 nvidia runc
> Default Runtime: runc
> Init Binary: docker-init
> containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
> runc version: v1.2.5-0-g59923ef
> init version: de40ad0
> Security Options:
> seccomp
> Profile: builtin
> cgroupns
> Kernel Version: 6.6.87.2-microsoft-standard-WSL2
> Operating System: Docker Desktop
> OSType: linux
> Architecture: x86\_64
> CPUs: 32
> Total Memory: 7.596GiB
> Name: docker-desktop
> ID: 9530e13e-cd1b-4da0-951b-f307ee72da07
> Docker Root Dir: /var/lib/docker
> Debug Mode: false
> HTTP Proxy: http.docker.internal:3128
> HTTPS Proxy: http.docker.internal:3128
> No Proxy: hubproxy.docker.internal
> Labels:
> com.docker.desktop.address=npipe://\\\\.\\pipe\\docker\_cli
> Experimental: false
> Insecure Registries:
> hubproxy.docker.internal:5555
> ::1/128
> 127.0.0.0/8
> Live Restore Enabled: false
> \`\`\`
> 
> \### Diagnostics ID
> 
> E2933143-5E15-4D9D-9D2C-E6AA9540BAA1/20251019074642
> 
> \### Additional Info
> 
> \_No response\_

I leave it here for other users to find it more easily.

---

<div class="post-metadata">

**Author:** ![pragyakeshap1](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/pragyakeshap1/32/54475_2.png) [@pragyakeshap1](https://forums.docker.com/u/pragyakeshap1)\
**Post date:** [October 19, 2025, 8:55pm UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/10 "2025-10-19T20:55:15Z")

</div>

Can you check Windows **“excluded port ranges.”**  
Windows can reserve ports even when nothing is listening, which silently blocks Docker’s bind.

Run below commands in PowerShell :

```auto
netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=tcp

```

If you see `1433` within any range, try a different host port (e.g., `-p 51433:1433`) or free the range (corporate policies may prevent that). Then re-run the container and confirm `docker ps` shows `0.0.0.0:51433->1433/tcp`.

---

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 20, 2025, 2:56am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/11 "2025-10-20T02:56:53Z")

</div>

Thanks, it has solved my question!

---

<div class="post-metadata">

**Author:** ![xiaofans](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xiaofans/32/61976_2.png) [@xiaofans](https://forums.docker.com/u/xiaofans)\
**Post date:** [October 20, 2025, 3:00am UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/12 "2025-10-20T03:00:46Z")

</div>

Since this issue has no obvious error characteristics, it is highly recommended that Docker automatically detects the port exclusion range of the host machine when running a container, and prompts the user to change the port if it falls within this range.

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [October 20, 2025, 5:22pm UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/13 "2025-10-20T17:22:54Z")

</div>

> [@xiaofans](#):
>
> it is highly recommended that Docker automatically detects the port exclusion range of the host machine when running a container,

Could you please share that idea in the GitHub issue you created or in the roadmap? Since you closed the issue, the roadmap would be a better place probably.

> **[docker/roadmap](https://github.com/docker/roadmap/issues)**
>
> Welcome to the Public Roadmap for All Things Docker! We welcome your ideas. - docker/roadmap

You shared the link to this topic but I would not expect developers clicking on that link soon if any time in a closed issue.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/docker/original/3X/6/9/69c4b276d1979e4e35a2f0338bac246a4de21daf.png) [@system](https://forums.docker.com/u/system)\
**Post date:** [November 19, 2025, 5:23pm UTC](https://forums.docker.com/t/container-port-mapping-issue/150171/14 "2025-11-19T17:23:36Z")

</div>

Closed on November 19, 2025, 5:23pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
