only podman via docker archive support
This commit is contained in:
parent
5e4c3eedb7
commit
41b42cdd68
13
Makefile
13
Makefile
@ -8,12 +8,19 @@ all: clean build
|
||||
run: build
|
||||
$(BUILD_PATH) build -t dive-example:latest -f .data/Dockerfile.example .
|
||||
|
||||
run-ci: build
|
||||
CI=true $(BUILD_PATH) dive-example:latest --ci-config .data/.dive-ci
|
||||
|
||||
run-large: build
|
||||
$(BUILD_PATH) amir20/clashleaders:latest
|
||||
|
||||
run-podman: build
|
||||
podman build -t dive-example:latest -f .data/Dockerfile.example .
|
||||
$(BUILD_PATH) localhost/dive-example:latest --engine podman
|
||||
|
||||
run-podman-large: build
|
||||
$(BUILD_PATH) docker.io/amir20/clashleaders:latest --engine podman
|
||||
|
||||
run-ci: build
|
||||
CI=true $(BUILD_PATH) dive-example:latest --ci-config .data/.dive-ci
|
||||
|
||||
build:
|
||||
go build -o $(BUILD_PATH)
|
||||
|
||||
|
@ -26,15 +26,13 @@ func (r *resolver) Build(args []string) (*image.Image, error) {
|
||||
}
|
||||
|
||||
func (r *resolver) Fetch(id string) (*image.Image, error) {
|
||||
img, err := r.resolveFromDisk(id)
|
||||
if err == nil {
|
||||
return img, err
|
||||
}
|
||||
// todo: there are still a number of bugs remaining with this approach --stick with the docker archive for now
|
||||
// img, err := r.resolveFromDisk(id)
|
||||
// if err == nil {
|
||||
// return img, err
|
||||
// }
|
||||
|
||||
// todo: remove print of error
|
||||
fmt.Println(err)
|
||||
|
||||
img, err = r.resolveFromDockerArchive(id)
|
||||
img, err := r.resolveFromDockerArchive(id)
|
||||
if err == nil {
|
||||
return img, err
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ func Run(options Options) {
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
fmt.Println(utils.TitleFormat("Fetching image...") + " (this can take a while for large images)")
|
||||
img, err = imageResolver.Fetch(options.ImageId)
|
||||
if err != nil {
|
||||
fmt.Printf("cannot fetch image: %v\n", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user