Unfriendly -p (--publish) syntax
It's difficult to understand docker run -p syntax. (TO:FROM). It took a while for me to realize where is the "from" part and where is the "to" part. This syntax is not described in help. I think that it would be better for new users to create alternative syntax variant (FROM->TO). That syntax, in my opinion, is more user-friendly. (copied from moby issue)
We'll unlikely be able to change the syntax as it has been used for a long time.
We added advanced syntax; (--publish ...) which is more explicit on these parts.
That said, the documentation can use some improvements; there's a "concepts" page, but it only mentions the shorthand syntax;
- https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/
- but links to https://docs.docker.com/engine/network/#published-ports, which doesn't mention the advanced syntax
- cli reference also doesn't mention advanced syntax and doesn't link to it; https://docs.docker.com/reference/cli/docker/container/run/#publish
But I don't propose breaking the old syntax, just adding an alternative short-hand -p 80->8080 will be good.
It won't break any existing scripts.