Skip to content

Commit

Permalink
docs: Add default image build policy
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn committed May 17, 2024
1 parent ac58b9f commit 734fb52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/api/create_docker_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ _ = new ImageFromDockerfileBuilder()
| `WithName` | Sets the image name e.g. `-t`, `--tag "testcontainers:0.1.0"`. |
| `WithDockerfile` | Sets the name of the `Dockerfile`. |
| `WithDockerfileDirectory` | Sets the build context (directory path that contains the `Dockerfile`). |
| `WithImageBuildPolicy` | Specifies an image build policy to determine when an image is built. |
| `WithDeleteIfExists` | Will remove the image if it already exists. |
| `WithBuildArgument` | Sets build-time variables e.g `--build-arg "MAGIC_NUMBER=42"`. |
| `WithCreateParameterModifier` | Allows low level modifications of the Docker image build parameter. |
Expand Down
1 change: 1 addition & 0 deletions src/Testcontainers/Builders/ImageFromDockerfileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace DotNet.Testcontainers.Builders
/// .WithDockerEndpoint(TestcontainersSettings.OS.DockerEndpointAuthConfig)
/// .WithLabel(DefaultLabels.Instance)
/// .WithCleanUp(true)
/// .WithImageBuildPolicy(PullPolicy.Always)
/// .WithDockerfile("Dockerfile")
/// .WithDockerfileDirectory(Directory.GetCurrentDirectory())
/// .WithName(new DockerImage("localhost/testcontainers", Guid.NewGuid().ToString("D"), string.Empty))
Expand Down

0 comments on commit 734fb52

Please sign in to comment.