mirror of
https://github.com/containers/podman
synced 2024-10-21 09:45:32 +00:00
auto-update: use image's arch
Use the architecture of the local image when looking for a new image on a registry. It seems to be common practice on ARM to tweak the architecture choice to pull the correct image. Fixes: #6613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
parent
2c7b39ddb8
commit
2a565f49c2
|
@ -251,8 +251,19 @@ func newerImageAvailable(runtime *libpod.Runtime, img *image.Image, origName str
|
|||
return false, err
|
||||
}
|
||||
|
||||
data, err := img.Inspect(context.Background())
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
sys := runtime.SystemContext()
|
||||
sys.AuthFilePath = options.Authfile
|
||||
|
||||
// We need to account for the arch that the image uses. It seems
|
||||
// common on ARM to tweak this option to pull the correct image. See
|
||||
// github.com/containers/libpod/issues/6613.
|
||||
sys.ArchitectureChoice = data.Architecture
|
||||
|
||||
remoteImg, err := remoteRef.NewImage(context.Background(), sys)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
|
Loading…
Reference in a new issue