mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add docker transport to push image before final failure
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #42 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
da44ec438d
commit
d43f786728
@ -4,9 +4,17 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Runtime API constants
|
||||
const (
|
||||
// DefaultTransport is a prefix that we apply to an image name
|
||||
// to check docker hub first for the image
|
||||
DefaultTransport = "docker://"
|
||||
)
|
||||
|
||||
// WriteFile writes a provided string to a provided path
|
||||
func WriteFile(content string, path string) error {
|
||||
baseDir := filepath.Dir(path)
|
||||
@ -42,3 +50,8 @@ func FuncTimer(funcName string) {
|
||||
elapsed := time.Since(time.Now())
|
||||
fmt.Printf("%s executed in %d ms\n", funcName, elapsed)
|
||||
}
|
||||
|
||||
// hasTransport determines if the image string contains '://', returns bool
|
||||
func hasTransport(image string) bool {
|
||||
return strings.Contains(image, "://")
|
||||
}
|
||||
|
Reference in New Issue
Block a user