Docker and CI/CD · Middle · Question 11 of 75

What does RUN --mount=type=cache,target=/root/.npm npm ci give you?

Explanation

Even when the layer is rebuilt, packages already downloaded are reused. The cache lives on the builder, so on ephemeral CI runners it needs exporting.

Further reading

Problem with a question

Docker and CI/CD · Middle · question 11

Test yourself

Take the Docker and CI/CD · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz