Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Docker image build policy #882

Merged
merged 1 commit into from
May 9, 2023

Conversation

HofmeisterAn
Copy link
Collaborator

What does this PR do?

Adds a new property ImageBuildPolicy to the IImageFromDockerfileConfiguration interface. The new member WithImageBuildPolicy(Func<ImagesListResponse, bool>) allows to configure a predicate that determines whether an image should be built or not. For example, developers can use WithImageBuildPolicy(PullPolicy.Missing) to build the image only if it does not already exist. @WojciechNagorski your feedback would be appreciated.

I am uncertain if we should copy and rename the static PullPolicy class to BuildPolicy. It contains the same properties.

Why is it important?

The image build policy makes it easier for developers to customize the image build behavior.

Related issues

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label May 8, 2023
@netlify
Copy link

netlify bot commented May 8, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit d34ffd4
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6458a673d1b187000773559e
😎 Deploy Preview https://deploy-preview-882--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@HofmeisterAn HofmeisterAn merged commit 0cbe774 into develop May 9, 2023
@HofmeisterAn HofmeisterAn deleted the feature/add-image-build-policy branch May 9, 2023 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add CreateIfNotExists() to IFutureDockerImage
1 participant