Merge pull request #5126 from influxdb/nc-faster-docker-save
Only save docker image if changed from loadpull/5145/head
commit
509d1ec22b
11
test.sh
11
test.sh
|
@ -106,9 +106,16 @@ function save_docker_image {
|
|||
then
|
||||
zcat $imagefile | docker load
|
||||
fi
|
||||
imageid=$(docker images -q --no-trunc "$imagename")
|
||||
build_docker_image "$dockerfile" "$imagename"
|
||||
docker save "$imagename" | gzip > "$imagefile"
|
||||
return "${PIPESTATUS[0]}"
|
||||
newimageid=$(docker images -q --no-trunc "$imagename")
|
||||
rc=0
|
||||
if [ "$imageid" != "$newimageid" ]
|
||||
then
|
||||
docker save "$imagename" | gzip > "$imagefile"
|
||||
rc="${PIPESTATUS[0]}"
|
||||
fi
|
||||
return "$rc"
|
||||
}
|
||||
|
||||
if [ ! -d "$OUTPUT_DIR" ]
|
||||
|
|
Loading…
Reference in New Issue