diff --git a/.data/Dockerfile b/.data/Dockerfile index 9f96d7d3..fc82c555 100644 --- a/.data/Dockerfile +++ b/.data/Dockerfile @@ -2,6 +2,7 @@ FROM alpine:latest ADD README.md /somefile.txt RUN mkdir /root/example RUN cp /somefile.txt /root/example/somefile1.txt +RUN chmod 444 /root/example/somefile1.txt RUN cp /somefile.txt /root/example/somefile2.txt RUN cp /somefile.txt /root/example/somefile3.txt RUN mv /root/example/somefile3.txt /root/saved.txt diff --git a/image/image.go b/image/image.go index f788ceeb..2ceee51c 100644 --- a/image/image.go +++ b/image/image.go @@ -268,7 +268,10 @@ func getImageReader(imageID string) (io.ReadCloser, int64) { fmt.Println(" Fetching metadata...") result, _, err := dockerClient.ImageInspectWithRaw(ctx, imageID) - check(err) + if err != nil { + fmt.Println(err.Error()) + utils.Exit(1) + } totalSize := result.Size fmt.Println(" Fetching image...")