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 alternative image repositories such as public.ecr.aws #4219

Closed
SingingBush opened this issue Jun 28, 2021 · 2 comments
Closed

support alternative image repositories such as public.ecr.aws #4219

SingingBush opened this issue Jun 28, 2021 · 2 comments

Comments

@SingingBush
Copy link

Now that docker hub is limiting the amount of calls that can be made it's getting more common for developers to use images from alternative repositories such as public.ecr.aws (see images in https://gallery.ecr.aws). I was hoping to use the Bitnami MySQL image from there so that the following:

new MySQLContainer("mysql:5.7")
            .withUsername("username")
            .withPassword("pass")
            .withDatabaseName("testdb");

get replaces with:

new MySQLContainer("public.ecr.aws/bitnami/mysql:5.7")
            .withUsername("username")
            .withPassword("pass")
            .withDatabaseName("testdb");

unfortunately org.testcontainers.containers.MySQLContainer won't work with this image, even though it's similar in configuration and could potentially be used instead of the image on docker hub.

@rnorth
Copy link
Member

rnorth commented Jun 29, 2021

Hi @SingingBush
Please see our pinned issue for this: #3099

As well as the solution for users: #3102
Documented here: https://www.testcontainers.org/features/image_name_substitution/

If this approach is not working for you please reopen, but I'll close this ticket for now.

@SingingBush
Copy link
Author

thanks for this, I see I was just missing the .asCompatibleSubstituteFor("mysql")

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

No branches or pull requests

2 participants