Closed athlordJojo closed 5 years ago
Ok, i found a solution: Create this file ~/.docker/config.json via the following command in the jenkins, before the tests are started via gradle:
sh 'echo "{\\"auths\\":{\\"https://company-docker.jfrog.io\\":{\\"auth\\": \\"\$(echo -n \$JFROG_USR:\$JFROG_PWD | base64)\\"}}}" > ~/.docker/config.json'
I really think, that this should be documented in testcontainers, even if it's part of docker-java.
Hi @athlordJojo, thanks for the remarks and providing the solution with an example. Do you think we should duplicate this into our docs, or just add references to docker-java?
Hey @kiview !
I really think, that this should be part of testcontaines documentation. For example: I didn't even knew, that textcontainers uses docker-java, so i didn't looked at there documentation.
Yes, this definitely makes sense. But we could just link to https://github.com/docker-java/docker-java#properties-docker-javaproperties for example.
By the way, the $HOME/.docker/config.json
is a general Docker approach, not docker-java specific I just realized: https://docs.docker.com/engine/reference/commandline/login/
ok, so will add the documentation ? becasue then we could close this issue.
I'd agree that this needs to be in the documentation. If anyone would like to raise a PR to add, it would be appreciated!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.
This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.
If this is a duplicate: i'am sorry, but i couldn't find any help in the docs...
I have the following setup: Jenkins runs a gradle-task inside docker (so i use docker.sock). From the gradle-job, i start my Integration test using testcontainers. My problem starts, when i want to use private repositories from jffrog (public images works fine). I tried to set the environment variables to the docker command which runs the gradle command via:
-e \"registryUsername=foo\" -e \"registryPassword=bar\" -e \"registryUrl=https://companyname.jfrog.io\"
Inside the container which runs gradle, i can see that the values are set correctily. But none of the values are picked up from testcontainers, which results in an error, complining about not be able to load the images...
What am i missing ? I found this change log but no docs how to configure it...
Any help is welcome, thank you!