-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Handle empty or invalid $HOME/.docker/config.json
gracefully
#4847
Comments
Hey @chibenwa, thanks for raising the issue. Can you please provide logs of the errors that occur in Testcontainers if |
I got for instance
|
That helps, thanks! |
$HOME/.docker/config.json
gracefully
I wonder if it should not be rather As this config is apparently only used to discover private registry if invalid we could adopt a lenient beaviour and behave as if there was no such file (maybe with a log) This is what docker CLI does:
You could see that even if it complains, the invalid file did not prevent the docker CLI from working normally... I think such a behaviour would be less specific to my use case but benefit the whole community. |
$HOME/.docker/config.json
gracefully$HOME/.docker/config.json
gracefully
BTW it looks like the exception is coming from docker-java, so a fix would be needed there first and then we just need to update it in Testcontainers. |
Hi @chibenwa, can you still reproduce this if invalid
I have tried to reproduce it locally (testcontainers version 1.17.2) by executing test provided here, but I can't (not sure if I'm doing something wrong, or if the "issue" is fixed) 🤔
|
@chibenwa Any way this can be still reproduced? |
It appeared on 1.18.0 (empty config.json file) (previous releases working fine) |
support for docker context was recently introduced in docker-java. So, that's what can cause the issue now. |
Hi @chibenwa, if this has been fixed could you please mark it done/close. |
Sure! |
Reference: https://issues.apache.org/jira/browse/INFRA-22697
Apparently testcontainers requires $HOME/.docker/config.json to be a valid JSON file.
The problem is that I have little control on the content of this file as provided on the ASF CI environments. I would like testcontainers to ignore it as missing when its content is missing...
The text was updated successfully, but these errors were encountered: