testcontainers-java
testcontainers-java copied to clipboard
[Bug]: dockerConfigFile property file not used
Module
Core
Testcontainers version
1.19.8
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host Arch
x86
Docker version
podman
What happened?
When trying to configure authentication, it seems that the documentation is misleading:
It says:
Use DOCKER_CONFIG_FILE environment variable.
export DOCKER_CONFIG_FILE=/some/location/config.json
Use dockerConfigFile java property
java -DdockerConfigFile=/some/location/config.json
here: https://java.testcontainers.org/modules/docker_compose/#using-private-repositories-in-docker-compose
But: dockerConfigFile is not used. and it looks like you should not use DOCKER_CONFIG_FILE, but DOCKER_AUTH_CONFIG instead.
Not having the ability to use a system property is annoyng, since it makes it diffucult to configure docker authentication with java code directly.
That's what I infer from: https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/utility/RegistryAuthLocator.java and from my tests.
Relevant log output
Additional Information
No response