This issue was originally raised for testcontainers library: testcontainers/testcontainers-java#2515 (comment)
When using docker credHelpers you can get different different passwords for the same container, which prevents reuse.
I'm basing this on checking the docker command just before the hash is calculated (org.testcontainers.containers.GenericContainer#hash). I've run the following command and observed that only the authConfig.password part was changed in the command between some of the runs.
System.err.println("docker command: " + ((DefaultDockerClientConfig) dockerClientConfig).getObjectMapper().copy().enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY).enable( SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS).writeValueAsString(createCommand));
I'm using docker-java 3.2.12, testcontainers-postgresql 1.16.2. I'm running docker images authorized using gcloud auth configure-docker which renders .docker/config.json with credHelpers set to gcloud for all URLs.
This issue was originally raised for testcontainers library: testcontainers/testcontainers-java#2515 (comment)
When using docker credHelpers you can get different different passwords for the same container, which prevents reuse.
I'm basing this on checking the docker command just before the hash is calculated (
org.testcontainers.containers.GenericContainer#hash). I've run the following command and observed that only theauthConfig.passwordpart was changed in the command between some of the runs.I'm using docker-java 3.2.12, testcontainers-postgresql 1.16.2. I'm running docker images authorized using
gcloud auth configure-dockerwhich renders .docker/config.json withcredHelpersset to gcloud for all URLs.