-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: inspect function support resolving shortname #2551
Conversation
|
9c6da4b
to
763079c
Compare
Codecov ReportBase: 65.09% // Head: 65.09% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #2551 +/- ##
=======================================
Coverage 65.09% 65.09%
=======================================
Files 8 8
Lines 573 573
=======================================
Hits 373 373
Misses 168 168
Partials 32 32 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Thank you for your first contribution! |
pkg/buildah/inspect.go
Outdated
return nil, nil, err | ||
return nil, nil, fmt.Errorf("error resolve shortname %s: %w", imgName, storage.ErrImageUnknown) | ||
} | ||
// also try out the "docker.io/" prefixed image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the ResolveLocally
functional, but seems we do not need to auto parse imgName for docker.io
with two reasons below:
- If the image belongs to
quay.io
orghcr.io
- if user is using one mirror registry like
dockerproxy.com/docker.io/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review! This function ParseDockerRef()
is just for backward compatibility. the function returns digested reference, e.g. docker.io/library/busybox:latest@sha256:xxxx
will be returned as docker.io/library/busybox@sha256:xxxx
.
Indeed, I guess we didn't have this scenario, so I have removed this function.
@fengxsong Is this pr also resolves #2388 ? |
Yes~ |
Signed-off-by: 24sama <[email protected]>
Fix #2524
Currently, there is an error when executing the run command with a short name:
This PR adds the
localhost
anddocker.io
prefixes to the shortname.More info about the shortname, please see: containers/buildah#1034