To me, the documentation for docker run --publish is unclear. So please correct me if I’m wrong: By reading
–publish , -p Publish a container’s port(s) to the host
I don’t know what format to use, even though there are plenty of resources on the internet that states the format is
And the first thing I try is
container_ip:container_port:host_ip:host_port due to the wording “Publish a container’s port(s) to the host`” when the actual usage is the inverse (host first, then container), as shown on another part of the docs (hard to find, even when it is directly related, due to lack of links from one to the other). The latter link is much more comprehensive and clear than the first.