Skip to content

Conversation

@Minei3oat
Copy link
Contributor

Since docker caches each instruction as a layer, we have to clean cached packages at the end of each step for minimal image size. As a drawback, we now have to download the package index again for the compiler and final container.

Since docker caches each instruction as a layer, we have to clean cached packages at the end of each step for minimal image size.
> Use ADD only when you need the additional capabilities it offers, but be mindful of potential security implications.
https://www.docker.com/blog/docker-best-practices-understanding-the-differences-between-add-and-copy-instructions-in-dockerfiles/
@domysh domysh merged commit 5343735 into Pwnzer0tt1:main Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants