mirror of
https://github.com/mappu/miqt.git
synced 2025-05-11 22:20:23 +00:00
Merge pull request #220 from mrex/miqt-docker-podman-support
replace "localhost/" prefix when searching for images to support Podman
This commit is contained in:
commit
2fc549206b
@ -8,6 +8,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -83,8 +84,10 @@ func dockerFindImage(repository, tag string) (*dockerImage, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
re := regexp.MustCompile("^localhost/")
|
||||
|
||||
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
|
||||
return &im, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user