Interview Prep/Docker/Dockerfile Instructions & Builds

What does `COPY --link` do?

AdvancedConceptDockerfile Instructions & Builds
Answer

It creates the copied layer independently of the previous layers, so changing a base layer does not invalidate and re-copy it, and layers can be rebased cheaply during pull/push. Useful with COPY --link --from=build /app /app. Trade-off: ownership/permission defaults apply from scratch, so specify --chown.

All Docker questions Roadmap: Docker & containers

More on Dockerfile Instructions & Builds