Skip to content

Commit 15314a7

Browse files
authored
Try out BUILDKIT_INLINE_CACHE=1
1 parent 665c78f commit 15314a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/dockerimage.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ jobs:
2121
# @see https://docs.docker.com/develop/develop-images/build_enhancements/
2222
COMPOSE_DOCKER_CLI_BUILD: "1"
2323
DOCKER_BUILDKIT: "1"
24+
2425
run: |
25-
# use this image as a source of cache layers to speed up subsequent builds
26-
# @see https://testdriven.io/blog/faster-ci-builds-with-docker-cache/
27-
docker pull $CACHE_IMAGE
26+
# build an image using the current Docker Hub container image as a layers cache
2827
29-
# build an image using the current Docker Hub container image
28+
# @see https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources
29+
# no need to "docker pull $CACHE_IMAGE", BuildKit is clever enough to pull it when needed
3030
docker build . \
3131
--tag ${{ github.repository }} \
32+
--build-arg BUILDKIT_INLINE_CACHE=1 \
3233
--cache-from $CACHE_IMAGE
3334
docker images
3435

0 commit comments

Comments
 (0)