CACHE [cached directories...]
The CACHE
instruction makes specific files/directories be shared across runs,
almost always as a performance improvement.
See the tuning performance documentation for more
details.
CACHE /var/cache/apt
to speed up RUN apt-get update
CACHE ~/.cache/go-build
to speed up RUN go install
CACHE ~/.npm ~/.next/cache ~/.yarn/cache
to speed up npm install
and
yarn install