You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally normalize docker image names to use `library/` prefix when
they don't have any namespace at all. This allows for the
`PrefixingImageNameSubstitutor` to be used to redirect Docker Hub
requests to a private registry without having to apply otherwise
redundant changes to the test code.
Copy file name to clipboardExpand all lines: docs/features/image_name_substitution.md
+7
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,13 @@ Testcontainers will not apply the prefix to:
77
77
* non-Hub image names (e.g. where another registry is set)
78
78
* Docker Hub image names where the hub registry is explicitly part of the name (i.e. anything with a `docker.io` or `registry.hub.docker.com` host part)
79
79
80
+
If you want your registry to handle both official Docker Hub images (e.g `postgres`)
81
+
as well as images from other registries (e.g `mycompany/postgres`), you can use the
82
+
`TESTCONTAINERS_HUB_IMAGE_NAME_NORMALIZE` environment variable or the `hub.image.name.normalize`
83
+
configuration option. When set to `true`, Testcontainers will normalize the official Docker Hub
84
+
image names to start with `library/`. When this option is used, Testcontainers will additionally
85
+
disable image compatibility checks done by some containers, so it the compatibility responsibility
86
+
is on the user.
80
87
81
88
82
89
## Developing a custom function for transforming image names on the fly
0 commit comments