summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.data/Dockerfile1
-rw-r--r--image/image.go5
2 files changed, 5 insertions, 1 deletions
diff --git a/.data/Dockerfile b/.data/Dockerfile
index 9f96d7d..fc82c55 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 f788cee..2ceee51 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...")