mirror of
https://github.com/mudler/luet.git
synced 2025-09-05 09:10:43 +00:00
🔧 Extract common func into api function, also set sane defaults
This commit is contained in:
@@ -18,7 +18,6 @@ package backend
|
||||
import (
|
||||
"os/exec"
|
||||
|
||||
"github.com/google/go-containerregistry/pkg/crane"
|
||||
"github.com/mudler/luet/pkg/api/core/types"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -28,13 +27,6 @@ const (
|
||||
DockerBackend = "docker"
|
||||
)
|
||||
|
||||
func imageAvailable(image string) bool {
|
||||
// We use crane.insecure as we just check if the image is available
|
||||
// It's the daemon duty to use it or not based on the host settings
|
||||
_, err := crane.Digest(image, crane.Insecure)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
ImageName string
|
||||
SourcePath string
|
||||
|
Reference in New Issue
Block a user