-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
fix: get URL from credentials when building the Dockerfile #764
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I'm not entirely sure if this is the correct fix -- just that it fixed my issue when I ran a test. I'm having difficulty running the entire suite locally. None of the tests failed at pulling an image fwiw |
Hi @HiranmayaGundu, looking the problem of testing the functionality, could we test this functionality with a private access image in Docker Hub? 🤔 |
@javierlopezdeancos we could, but it would have to be a private docker hub image that the project has access to (and presumably one that i personally don't have access to) |
hi @HiranmayaGundu yep, I think that should be an image created to someone from the docker organization to this proposes cc @eddumelendez @cristianrgreco |
I don't think using Docker Hub for such an integration test makes sense, since community contributors would not have access to such a private image. Can we replicate the scenario by starting a registry ourselves, or would the auth mechanism behave very differently? If a maintainer of the repo (e.g. @cristianrgreco) can manually test that this works, I think it is also fine and we should not block the merging if the can't find a way to conveniently test it. |
@javierlopezdeancos @cristianrgreco wanted to bump this for review 🙏🏽 |
Hi @HiranmayaGundu, thanks for raising this PR, I'll verify this works this weekend. |
Thank you @cristianrgreco! Appreciate it 😄 |
When creating a container using a docker image from a private repository, testcontainers would fail to auth correctly, and would never fetch the image. i.e.,
FROM gcr.io/<image>
would fail. This is not a problem when running the image directly. After a bit of digging, it seems likeserverURL
was being set as undefined, and it seems like the fix is to use the credentials object that has the server list.I'm not sure how to go about adding a test for this, it needs a Dockerfile to a private repository that the project has access to.