Reverse order of long-form ports #2252
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion t
2EFA
o a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
Reverses the order long-form port options when converted to short-form to correctly match the documentation and
docker service create
. See https://docs.docker.com/engine/reference/commandline/service_create/#publish-service-ports-externally-to-the-swarm--p---publishPost change
-p published=8111,target=8112
is the equivalent of8111:8112
- How I did it
Changed the order of the values when converting from long to short-form when the options are parsed
- How to verify it
Build and run
docker run -d --name run_test -p published=8111,target=80 nginx
. nginx should be accessible from the host with port 8111- Description for the changelog
Fixes #2250
- A picture of a cute animal (not mandatory but encouraged)