Skip to content

Handle empty or invalid $HOME/.docker/config.json gracefully #4847

@chibenwa

Description

@chibenwa

Reference: https://issues.apache.org/jira/browse/INFRA-22697

Apparently testcontainers requires $HOME/.docker/config.json to be a valid JSON file.

touch ~/.docker/config.json
// lauch some test containers tests will now fail

echo '{}' > ~/.docker/config.json
// lauch some test containers tests will now succeeds

rm ~/.docker/config.json
// lauch some test containers tests will now succeeds

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions