From 66bb5774ae824b93d586fb51870e16d8c84309d2 Mon Sep 17 00:00:00 2001 From: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:30:10 +0200 Subject: [PATCH] docs: Add version pinning is a best practice --- docs/api/best_practices.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api/best_practices.md b/docs/api/best_practices.md index 653f40a6a..a38d55e18 100644 --- a/docs/api/best_practices.md +++ b/docs/api/best_practices.md @@ -9,3 +9,4 @@ At times, configuring and launching disposable Docker resources for testing purp 5. Avoid mounting local host paths to containers. Instead, use `_container.WithResourceMapping(string, string)` or one of its overloaded members to copy dependent files to the container before it starts. 6. In rare cases, it may be necessary to access the underlying Docker API to configure specific properties that are not exposed by Testcontainers' own API. To get access to all Docker API properties required to create a resource, use `_builder.WithCreateParameterModifier(Action)`. 7. Do not disable the Resource Reaper, as it cleans up remaining test resources. Disabling it may clutter up the test environment. +8. Ensure that the image version is overridden and pinned, regardless of whether you are using the generic or module container builder `_builder.WithImage("alpine:3.20.0")`.