You need to bind to the public IP, or as suggested above, “share” the unix socket as a volume and then connect to that.
However you won’t be able to use curl, I think, to connect to the unix socket.
If you use a public IP a local firewall on the docker server can be used to restrict access from the outisde, or specific container IPs.