Fix docker run for 64 byte hex ID#21002
Conversation
459f48a to
7d187d6
Compare
|
@tonistiigi: Tests need updates. I'm hesitant about allowing unprefixed 64-bit IDs for some commands (run, rmi) and not allowing it for others (tag, push, pull, etc.). I think if we're declaring that 64-bit IDs are okay as long as they're not tag references, we should remove the check that prevents them in the reference package, and instead have a check in |
|
cc @dmcgowan |
|
If it is supported for run and rmi, then it should also be supported on tag. I would be more in favor of detecting when these un-prefixed IDs are used and add the prefix before parsing. Are we trying to say that a 64-bit ID should always be interpreted as if the "sha256:" was implied? If that is the case we should just add the implied prefix without changing any of the image config interpretation code. |
Push and pull don't allow image IDs. Tag already works correctly like run and rmi. |
|
What's the status here? Also, looks like tests are failing @tonistiigi |
1c6249b to
8a25180
Compare
|
@aaronlehmann @dmcgowan I updated by adding a modified parser function for the cases where we allow both IDs and references but handle them bit differently. This maintains meaningful error messages and still catches invalid references. I think it's important to keep the distinction between IDs and refs and not just add extra validation on insertion to tagstore. |
8a25180 to
99ec5b3
Compare
Fixes moby#20972 Also makes sure there is no check to registry if no image is found for the prefixed IDs. Signed-off-by: Tonis Tiigi <[email protected]>
99ec5b3 to
16e4c4e
Compare
|
Updated |
|
LGTM |
2 similar comments
|
LGTM |
|
LGTM |
Fix docker run for 64 byte hex ID
|
This appears to have regressed in 17.04.0-ce In version 17.03.1 using docker tag [:tag] works fine. |
|
@samuraisam Can you open a new issue with the details? |
Fixes #20972
Also makes sure there is no check to registry if
no image is found for the prefixed IDs.
@aaronlehmann
Signed-off-by: Tonis Tiigi [email protected]