mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-24 11:31:46 +00: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:
parent
ad44023a93
commit
c9bcbf71e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user