testcontainers-dotnet icon indicating copy to clipboard operation
testcontainers-dotnet copied to clipboard

feat(#540): Support for registry auth credentials from env var DOCKER_AUTH_CONFIG

Open vova-lantsov-dev opened this issue 2 years ago • 5 comments

vova-lantsov-dev avatar Aug 02 '22 20:08 vova-lantsov-dev

@HofmeisterAn ubuntu pipeline got stuck?

vova-lantsov-dev avatar Aug 03 '22 00:08 vova-lantsov-dev

@HofmeisterAn I don't completely understand the purpose of these classes (CustomConfiguration, EnvironmentConfiguration and PropertiesFileConfiguration) in case of DockerRegistryAuthenticationProvider logic, but I made some changes, please review them and let me know if I misunderstood anything

vova-lantsov-dev avatar Aug 06 '22 20:08 vova-lantsov-dev

I reviewed and applied your suggestions, but with small change:

image

GetDefaultDockerAuthConfig() now returns nullable value because we want to check for default docker config even if dockerConfigFile doesn't exist (else if block)

vova-lantsov-dev avatar Aug 09 '22 22:08 vova-lantsov-dev

I can test this on my local machine and CI server if you pack it into the NuGet

vova-lantsov-dev avatar Aug 09 '22 22:08 vova-lantsov-dev

@HofmeisterAn I confirm that it works locally with .docker directory and on CI/CD server with DOCKER_AUTH_CONFIG env variable. I think we can merge this to develop and pack into release tag

vova-lantsov-dev avatar Aug 10 '22 21:08 vova-lantsov-dev

By the way, it looks like I tested not the same code as this PR produces. That's why we have conflict

vova-lantsov-dev avatar Aug 11 '22 09:08 vova-lantsov-dev

Oh, I see, you made some further changes. Do you want me to repeat them in my code, or you will just close the PR?

vova-lantsov-dev avatar Aug 11 '22 09:08 vova-lantsov-dev

Do you want me to repeat them in my code, or you will just close the PR?

No, not necessary. I merged and pushed all changes to develop already. You tested the right version. Thanks again.

HofmeisterAn avatar Aug 11 '22 13:08 HofmeisterAn

Hi @HofmeisterAn Please let me know when you plan to publish the release version containing this feature? It's quite strange to use the beta version of package in production environment :)

vova-lantsov-dev avatar Aug 26 '22 09:08 vova-lantsov-dev

No ETA yet. I'd like to add the custom HTTP headers to the next version first.

HofmeisterAn avatar Aug 26 '22 19:08 HofmeisterAn