Description
This week I noticed that the command docker compose port app 80 sometimes returns :0 instead of the actual port. See the screenshot here:

Steps To Reproduce
No response
Compose Version
Docker Compose version v2.12.2
Docker Environment
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
compose: Docker Compose (Docker Inc., v2.12.2)
Server:
Containers: 4459
Running: 19
Paused: 0
Stopped: 4440
Images: 984
Server Version: 20.10.21
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
cgroupns
Kernel Version: 5.10.0-19-amd64
Operating System: Debian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 125.6GiB
Name: shop
ID: TZUB:ZIAT:RVG5:P27F:2HBN:2PSL:FHAO:KW7X:JLIY:CUGY:X3DL:PN2X
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response
Description
This week I noticed that the command
docker compose port app 80sometimes returns:0instead of the actual port. See the screenshot here:Steps To Reproduce
No response
Compose Version
Docker Environment
Anything else?
No response