Skip to content

Commit

Permalink
Merge #377
Browse files Browse the repository at this point in the history
377: Avoid pulling if image already exists locally. r=adamgreig a=reitermarkus

This avoids overwriting the local image when making changes to images locally.

Co-authored-by: Markus Reiter <[email protected]>
  • Loading branch information
bors[bot] and reitermarkus authored Mar 13, 2020
2 parents 684fed5 + 486499e commit 47f325a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ run() {
local image_name="rustembedded/cross:${1}"
local cache_from_args=

if docker pull "${image_name}"; then
if docker image inspect "${image_name}" &>/dev/null || docker pull "${image_name}"; then
cache_from_args=(--cache-from "${image_name}")
fi

Expand Down

0 comments on commit 47f325a

Please sign in to comment.