You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have a Dockerfile with many layers, then the following
RUN apk add --virtual .build-deps some package names
RUN pip install some python package names
RUN apk del .build-deps
Then perhaps some more layers. Is there a way in dive to see the aggregate changes from the start of those three layers to the end, such that I can see what to COPY in a multi-stage build? As far as I can tell, I can only see the diff from the start to the end of a single layer, or from the start of the most base docker image(?) to the end of the current layer, which has a great deal of noise.
Note that I could change the Dockerfile to read something like
RUN apk add --virtual .build-deps some package names \
&& pip install some python package names \
&& apk del .build-deps
But that involves installing the build requirements every time the python package requirements change, rather than simply reusing a previous layer. (I'm also aware of buildkit's cache mounts and --no-cache for apk, but they're not relevant enough to the question to muddy the examples).
The text was updated successfully, but these errors were encountered:
Just to clarify, you'd like to view aggregate changes from an arbitrary start layer, to an arbitrary end layer, instead of seeing the diff from the beginning to the current layer?
Suppose I have a
Dockerfile
with many layers, then the followingThen perhaps some more layers. Is there a way in dive to see the aggregate changes from the start of those three layers to the end, such that I can see what to
COPY
in a multi-stage build? As far as I can tell, I can only see the diff from the start to the end of a single layer, or from the start of the most base docker image(?) to the end of the current layer, which has a great deal of noise.Note that I could change the
Dockerfile
to read something likeRUN apk add --virtual .build-deps some package names \ && pip install some python package names \ && apk del .build-deps
But that involves installing the build requirements every time the python package requirements change, rather than simply reusing a previous layer. (I'm also aware of buildkit's cache mounts and
--no-cache
forapk
, but they're not relevant enough to the question to muddy the examples).The text was updated successfully, but these errors were encountered: