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

Allow authenticating against multiple registries #1089

Open
applike-ss opened this issue Mar 5, 2024 · 0 comments
Open

Allow authenticating against multiple registries #1089

applike-ss opened this issue Mar 5, 2024 · 0 comments

Comments

@applike-ss
Copy link
Contributor

applike-ss commented Mar 5, 2024

I would like to be able to authenticate against multiple registries, not just one.

There can be the issue where you run into dockerhub limits (thus desire to authenticate against it to double your pull limit) and then also requiring authentication agains another container registry which is hosting semi-public or private images.

Suggestion 1:
Make the container runner more clever and let it read more registries authentication from the env vars.
Example vars:

TEST_CONTAINER_RUNNER_REGISTRY_NAMES=dockerhub,publicecr # potentially optional
TEST_CONTAINER_RUNNER_REGISTRY_DOCKERHUB_USERNAME=x
TEST_CONTAINER_RUNNER_REGISTRY_DOCKERHUB_PASSWORD=y
TEST_CONTAINER_RUNNER_REGISTRY_DOCKERHUB_SERVER_ADDRESS=z
TEST_CONTAINER_RUNNER_REGISTRY_AWS_PUBLIC_USERNAME=x
TEST_CONTAINER_RUNNER_REGISTRY_AWS_PUBLIC_PASSWORD=y
TEST_CONTAINER_RUNNER_REGISTRY_AWS_PUBLIC_SERVER_ADDRESS=z

Suggestion 2:
Make use of the NewAuthConfigurationsFromDockerCfg func of dockertest to read from .docker/config or .dockercfg files automatically.
This would be cleaner in my opinion on the application/library side, but might require manual creating the docker config on the ci job.
Also take this into account: ory/dockertest#487

I would prefer to implement the latter as the library shouldn't bother about complexity of the ci and should rather "feel native".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant