Repository navigation
Reverse order of long-form ports - #2252
Merged
thaJeztah merged 1 commit intoJan 15, 2020
Merged
Conversation
silvin-lubecki
approved these changes
Jan 15, 2020
silvin-lubecki
left a comment
Contributor
There was a problem hiding this comment.
The change looks good, but do you think we can add a test on this fix @zappy-shu ?
Member
Reverses the order long-form port options when converted to short-form to correctly match the documentation and `docker service create`. Post change `-p published=8111,target=8112` is the equivalent of `8111:8112` Signed-off-by: Nick Adcock <nick.adcock@docker.com>
zappy-shu
force-pushed
the
2250-reverse-port-long-format-order
branch
from
January 15, 2020 12:12
c7916e4 to
154a1f6
Compare
Author
|
@silvin-lubecki PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 to 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=8112is 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)