mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
update buildah to latest and use new network stack
Make sure buildah uses the new network stack. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
24
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
Normal file
24
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/containers/common/libimage"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage"
|
||||
)
|
||||
|
||||
// LookupImage returns *Image to corresponding imagename or id
|
||||
func LookupImage(ctx *types.SystemContext, store storage.Store, image string) (*libimage.Image, error) {
|
||||
systemContext := ctx
|
||||
if systemContext == nil {
|
||||
systemContext = &types.SystemContext{}
|
||||
}
|
||||
runtime, err := libimage.RuntimeFromStore(store, &libimage.RuntimeOptions{SystemContext: systemContext})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
localImage, _, err := runtime.LookupImage(image, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return localImage, nil
|
||||
}
|
Reference in New Issue
Block a user