mirror of
https://github.com/mappu/miqt.git
synced 2025-05-13 15:10:21 +00:00
replace "localhost/" prefix when searching for images to support Podman
This commit is contained in:
parent
7a6bac85b4
commit
32875ef65f
@ -8,6 +8,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"regexp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -83,8 +84,10 @@ func dockerFindImage(repository, tag string) (*dockerImage, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
re := regexp.MustCompile("^localhost/")
|
||||||
|
|
||||||
for _, im := range images {
|
for _, im := range images {
|
||||||
if im.Repository == repository && im.Tag == tag {
|
if (im.Repository == repository || re.ReplaceAllString(im.Repository, "") == repository) && im.Tag == tag {
|
||||||
// found it
|
// found it
|
||||||
return &im, nil
|
return &im, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user