Docker container port mapping missing in docker desktop UI

port mapping is missing for container in windows docker desktop UI but when i run docker ps I can see the port mapping.

docker version 4.3.0. I have tried the latest version (4.3.7) as well.

Please, share the output of

docker version

When you do, please use code blocks (backticks not single quotes):

```
output
```

There is no Docker 4.3.0 and the latest Docker Desktop is also Docker Desktop 4.37.2

Can you also share a screenshot of Docker Desktop where you expect to see the port mapping and the command line output where you actually see it?

Also do you have problem with connections or you just donā€™t understand why the port maping is not shown on the UI?

The comand line output can show the exposed ports as well, but that is not the same as forwarded ports

C:\Users\shrir>docker version
Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.1.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        4cf5afa
 Built:             Tue Apr 30 11:48:43 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.30.0 (149282)
 Engine:
  Version:          26.1.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       ac2de55
  Built:            Tue Apr 30 11:48:28 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

sorry, put the wrong version.

Iā€™m expecting port forwarding for the postgres container in docker desktop

shrir@shriram MINGW64 ~
$ docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED         STATUS         PORTS                     NAMES
86d462223bf9   postgis/postgis:15-3.3               "docker-entrypoint.sā€¦"   8 minutes ago   Up 8 minutes   0.0.0.0:50264->5432/tcp   compassionate_leavitt
eec6b2222a92   testcontainersofficial/ryuk:latest   "/app"                   8 minutes ago   Up 8 minutes   0.0.0.0:50259->8080/tcp   testcontainers-ryuk

no problem with connection, just the port forwarding not showing up on docker desktop sometimes as you see itā€™s always listed when i run docker ps.

That port should indeed be visible in Docker Desktop. I found this issue which could be related

Can you confirm if you stop Docker Desktop and start again, the port numbers appear?

Doesnā€™t it make more sense to install the latest version?

Note: On Windows it is 4.37.1, on mac it is 4.37.2 (with has bug fixes specifc to the mac version)

1 Like

Of course @meyay is completely right. By the time I came back to your post, I forgot the version number. So first try to update Docker Desktop :slight_smile:

I did use the latesr version and had the same issue. So, i switched version that previously woked for me and i had the same issue

The second thing I forgot. Great :smile: Have you also tested what I wrote previously?

Depending on that, you can either comment on the previously linked existing issue or create a new one

Yes, i have. The port number does appear on restarting the container but since the containers are created as a part of test run. Iā€™d need to restart it multiple times due to this

I didnā€™t think it was a solution, but we canā€™t solve it. You can report it on GitHub where developers can see it. Since there is an existing issue describing the same problem, you can also comment on that.

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