Skip to content

Dockerfile rebuilt every debug session AddDockerfile(..).WithLifetime(Persistent) #6928

Answered by danegsta
Simon900225 asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, verbose logging will report potential changes that triggered a rebuild of the container. Most likely, as David suggested, it’s that something about your Dockerfile is preventing your image builds from being cached (generally a COPY or ADD command pointing at a folder whose contents are changing between builds). Due to Docker build caching, building the same image multiple times with no changes to the Docker build context (the local folders Docker pulls file contents from) should result in the same final image ID.

This is admittedly a bit fuzzy compared to the other persistent container rebuild triggers and is something where we should consider adding configuration to optionally skip…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@danegsta
Comment options

Answer selected by Simon900225
Comment options

You must be logged in to vote
9 replies
@davidfowl
Comment options

@danegsta
Comment options

@sajmonr
Comment options

@danegsta
Comment options

@sajmonr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants