1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-04-01 20:50:09 +02:00

Set mode=max to cache intermediate stages

buildx caches layer only in the final stage by default.
To speedup multi-stage Dockerfile build, better to set `mode=max`: https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to

Signed-off-by: saiya <saiya.v6@gmail.com>
This commit is contained in:
Seiya Yazaki 2021-05-28 14:52:51 +09:00 committed by saiya
parent ad44023a93
commit c9bcbf71e2

View file

@ -41,7 +41,7 @@ jobs:
push: true
tags: user/app:latest
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
cache-to: type=inline,mode=max
```
## GitHub cache
@ -95,7 +95,7 @@ jobs:
push: true
tags: user/app:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
-
# Temp fix
# https://github.com/docker/build-push-action/issues/252