Skip to content
Moritz Röhrich edited this page Apr 7, 2021 · 1 revision

yarn cache clean missing after yarn install was run.

Problematic code:

RUN yarn install

Correct code:

RUN yarn install \
 && yarn cache clean

Rationale:

yarn keeps a local cache of downloaded packages. This unnecessarily increases image size. It can be cleared by executing yarn cache clean.

Clone this wiki locally