Cache management for ARG command with multi-config build #1774
Wayofthesin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to have multi-configuration build with all of the configuration pushed to the top as follows (the following is pretty much standard layer setup for my daily work with Docker):
The docker documentation states that:
Given this I would expect that change of the
BUILD_APT_DEPS_dev
ARG would only invalidate thebuild_base
layer but it's not what I am observing. Upon change of the mentioned ARG the whole cache is invalidated and the image is rebuilt. Is it intended behavior?I am aware of the pattern where different configuration is kept in separate files but I find it more complex than single file configuration. When copying across different layers it might require specific build order and you might unintentionally work with old data without any notification. I would like to focus on ARG cache handling on this topic so please keep it out of the discussion.
Beta Was this translation helpful? Give feedback.
All reactions