BuildKit
BuildKit copied to clipboard
Example how to cache for perl `cpm`
FROM perl
RUN cpanm -n -L ./local App::cpm Carton::Snapshot && rm -rf /root/.cpanm
COPY cpanfile ./
COPY cpanfile.snapshot ./
RUN --mount=type=cache,id=perl,target=/root/.perl-cpm \
cpm install -w 16 --no-test -L ./local