Allow backwards-compatible colon syntax for tags in 'commit' command#2450
Closed
binaryphile wants to merge 1 commit intomoby:masterfrom
binaryphile:master
Closed
Allow backwards-compatible colon syntax for tags in 'commit' command#2450binaryphile wants to merge 1 commit intomoby:masterfrom binaryphile:master
binaryphile wants to merge 1 commit intomoby:masterfrom
binaryphile:master
Conversation
Contributor
|
I ran into this problem as well. |
Contributor
|
Me too Michael Crosby
|
Contributor
|
couldn't we do the same as a quick fix for |
Contributor
|
yup - though this PR probably isn't right :) (sorry @binaryphile ), as there's a utils.ParseRepositoryTag that I'm using :) |
Author
|
More than happy to have a better pull request. |
cpuguy83
pushed a commit
to cpuguy83/docker
that referenced
this pull request
May 25, 2021
Always configure iptables forward policy
cpuguy83
pushed a commit
to cpuguy83/docker
that referenced
this pull request
May 25, 2021
Reverts 141b53c (PR moby#2450) Fallout from changing the forwarding default policy to deny was greater than anticipated. Signed-off-by: Euan Harris <[email protected]>
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.
Hi there,
I'm not a go programmer, just a docker user. I've been foiled by the inconsistent syntax of the "commit" command many times, even though I'm aware of it. The command doesn't use the colon-based tag syntax used by, I believe, every other command in the docker repertoire.
What happens is that when you accidentally use the commit command with a colon to designate the tag name, docker happily creates a repository where the repository name includes a colon. This is clearly not the user's intent, and it renders the image name unusable by the rest of the docker commands. For example, you cannot then remove the image by name, since the rmi command interprets the colon-based name correctly, and can't find the repository with the colon in the repository name. You must use look up the image id and can only remove it by id.
The pull request here is simply my best guess at modifying the commit command to correctly determine that the user intended to create a tag name with the colon-based syntax. It first tests to see that there is no formal tag argument, then tests to see if there is a colon in the repository name. If so, it reparses the repository and tag arguments by splitting the repository string on colon.
I can't even compile this as I don't have the go language environment set up. I'm submitting this to spark a conversation, not necessarily provide the solution. I did make a good faith effort to use the proper syntax, however, so I wouldn't be entirely surprised if the code actually worked.
If you guys could fix this, it would make me so happy. Thanks!