fail on image not found without panic; add extra chmod case to test dockerfile
This commit is contained in:
parent
1baa942d37
commit
53b11f4ecf
@ -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
|
||||
|
@ -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...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user