-
Notifications
You must be signed in to change notification settings - Fork 0
Container Cache
Prayag edited this page Jan 6, 2023
·
6 revisions
If you’re sick of re-downloading all external dependencies every time there’s a change to one of them, the cache mount can help you save time in the future.
Inside of your Dockerfile
, add a mount
flag, specifying which directories should be cached during the step.
Example:
FROM gradle:7.3-jdk11 as builder
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/cache/apt