Skip to content

Is it possible to reuse an Image? #1178

Answered by HofmeisterAn
jorgefm asked this question in Q&A
Discussion options

You must be logged in to vote

You can configure the behavior with the following API:

WithImageBuildPolicy(Func<ImageInspectResponse, bool>)

By default, the builder always builds the image. You can either use the existing pull policy predicate:

WithImageBuildPolicy(PullPolicy.Missing)

or use your own:

WithImageBuildPolicy(cachedImage => cachedImage == null)

I noticed that this API is not mentioned in the docs. I will update it later.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by HofmeisterAn
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants