Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for credentials from environment variables #540

Closed
vova-lantsov-dev opened this issue Aug 1, 2022 · 2 comments
Closed

Support for credentials from environment variables #540

vova-lantsov-dev opened this issue Aug 1, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@vova-lantsov-dev
Copy link
Contributor

Describe the solution you'd like
For CI/CD purposes, it'd be really useful to be able to auth via environment variables that contains the Docker config data. Here is an example: https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#determine-your-docker_auth_config-data

Something like that:
image

@HofmeisterAn
Copy link
Collaborator

The env variable DOCKER_AUTH_CONFIG is not yet supported. Base64 just works with ~/.docker/config.json. Anyway, it is not difficult to implement. We just need another provider. Something like:

internal sealed class Base64Provider : IDockerRegistryAuthenticationProvider

To read the value from the env variable or ~/.testcontainers.properties file, we need another getter in:

internal sealed class PropertiesFileConfiguration : CustomConfiguration, ICustomConfiguration

Probably we can use the same test cases, like we are using for ~/.docker/config.json:

Would you like to create a pull request?

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Aug 1, 2022
@vova-lantsov-dev
Copy link
Contributor Author

Sure, I would try

vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 2, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 2, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 2, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 6, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 6, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 6, 2022
vova-lantsov-dev added a commit to vova-lantsov-dev/testcontainers-dotnet that referenced this issue Aug 9, 2022
HofmeisterAn pushed a commit that referenced this issue Aug 10, 2022
@HofmeisterAn HofmeisterAn added this to the 2.2.0 milestone Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants