Skip to content

Commit

Permalink
build-to-localhost: Add run-specific tag for caching
Browse files Browse the repository at this point in the history
Previously, only the `latest` tag was used for caching. Using the target
tag for caching should help with iterative changes pushed to the same
tag.
  • Loading branch information
victorlin authored Sep 29, 2022
1 parent 92ecfcc commit 7fa55a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devel/build-to-localhost
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ docker buildx build \
--build-arg CACHE_DATE \
--build-arg GIT_REVISION \
--cache-from $BASE_BUILDER_IMAGE:latest \
--cache-from $BASE_BUILDER_IMAGE:$tag \
--cache-from $BASE_IMAGE:latest \
--cache-from $BASE_IMAGE:$tag \
--cache-to type=inline \
--tag localhost:5000/$BASE_BUILDER_IMAGE:$tag \
--push \
Expand All @@ -62,7 +64,9 @@ docker buildx build \
--build-arg CACHE_DATE \
--build-arg GIT_REVISION \
--cache-from $BASE_BUILDER_IMAGE:latest \
--cache-from $BASE_BUILDER_IMAGE:$tag \
--cache-from $BASE_IMAGE:latest \
--cache-from $BASE_IMAGE:$tag \
--cache-to type=inline \
--tag localhost:5000/$BASE_IMAGE:$tag \
--push \
Expand Down

0 comments on commit 7fa55a4

Please sign in to comment.