Forwarded port cannot be re-used by another container
See original GitHub issueI experienced similar problem. I started nginx container with nerdctl run -p 8080:80 nginx
.
It worked as expected then I press ctr-c, container stopped. When I tried to start the container again with the same command it was not working. The container started but the port was not exported / published (I checked also with netstat).
This problem disappear after restart of the rancher desktop. Then again I was able to start the nginx and it was reachable, but again when I ctr-c it stopped working again. When I changed the Container Runtime to dockerd and used ‘docker’ instead of ‘nerdctl’ everything worked as expected.
My Info: I’m on Mac Apple M1 Pro Rancher desktop 1.0.0. Kubernetes 1.23, 1.22 Container Runtime: containerd
_Originally posted by @martinjankovic in https://github.com/rancher-sandbox/rancher-desktop/issues/1411#issuecomment-1025463841_
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (2 by maintainers)
Re-opening, since the issue has been reported with 1.3.0 now.
I’m also wondering why I considered #1411 as a different problem; should be re-examined as well.
Another maybe not so hard workaround (like resetting kubernetes) is, just to delete stopped containers: