When trying to map a port with Docker on colima, the map works, but the port is not open for listening on MacOS
You may end here if you went through this or this other questions and still stuck.
For:
A docker container exposing a port will not be listening (checked for example with netstat
) even if docker port \<container\>
shows it is.
Example docker run: docker run -p 80:80 -name mycontainer myimage
What is the solution so that the port is listening in the local host?
The answer is in the Colima FAQ - Enable reachable IP address
colima start --network-address
It is only a mechanism for OSX because it asks for an admin pwd to be able to work.
This problem suddenly happened to me, which was odd cause I'd been running docker containers and accessing them via localhost:port.
I tried a bunch of things but stopping and starting colima is what finally did it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With