I am attempting to try out Service Fabric on my local MacBook Pro running Docker Desktop. I'm following along with Microsoft's documentation located here: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-mac
When I go to launch the Docker container, I'm calling this command
docker run --rm --name svcfabric -d -v /var/run/docker.sock:/var/run/docker.sock -p 19080:19080 -p 19000:19000 -p 25100-25200:25100-25200 mcr.microsoft.com/service-fabric/onebox:u18
However, the only port exposed is 25106. The web console on 19080 is unreachable. Port 19000 isn't exposed.
I see this by running
sudo lsof -i -nP | grep LISTEN
with the only docker rows showing
com.docke 29799 username 51u IPv6 0x34c6afc17f8b91eb 0t0 TCP *:25106 (LISTEN)
com.docke 30499 username 11u IPv4 0x34c6afc15c8ec573 0t0 TCP 127.0.0.1:54131 (LISTEN)
However, if I do a
docker port svcfabric
it will list out all the expected ports... (I'll put a sampling, but with the range, it runs quite long)
19000/tcp -> 0.0.0.0:19000
19000/tcp -> :::19000
25109/tcp -> 0.0.0.0:25109
25109/tcp -> :::25109
25153/tcp -> 0.0.0.0:25153
25153/tcp -> :::25153
25155/tcp -> 0.0.0.0:25155
25155/tcp -> :::25155
25182/tcp -> 0.0.0.0:25182
25182/tcp -> :::25182
25100/tcp -> 0.0.0.0:25100
25100/tcp -> :::25100
25125/tcp -> 0.0.0.0:25125
25125/tcp -> :::25125
If I remove the port range from the docker run
command and only have -p 19080:19080 -p 19000:19000, then only port 19000 is exposed. If I only have -p 19080:19080, then port 19080 works and I can bring up the web console.
Can anyone tell me what's going on?
https://github.com/docker/for-mac/issues/5247
So... it turns out to be a bug with IPv6, Mac, and Docker.