Skip to content

Conversation

@thaJeztah
Copy link
Member

Before this change, a warning would be printed if the ~/.docker/config.json
file was empty:

mkdir -p ~/.docker && touch ~/.docker/config.json
docker pull busybox
WARNING: Error loading config file: /root/.docker/config.json: EOF
Using default tag: latest
....

Given that we also accept an empty "JSON" file ({}), it should be
okay to ignore an empty file, as it's effectively a configuration file
with no custom options set.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Before this change, a warning would be printed if the `~/.docker/config.json`
file was empty:

    mkdir -p ~/.docker && touch ~/.docker/config.json
    docker pull busybox
    WARNING: Error loading config file: /root/.docker/config.json: EOF
    Using default tag: latest
    ....

Given that we also accept an empty "JSON" file (`{}`), it should be
okay to ignore an empty file, as it's effectively a configuration file
with no custom options set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter
Copy link

Codecov Report

Merging #2599 into master will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2599      +/-   ##
==========================================
- Coverage   58.05%   58.04%   -0.01%     
==========================================
  Files         295      295              
  Lines       21165    21165              
==========================================
- Hits        12288    12286       -2     
- Misses       7975     7976       +1     
- Partials      902      903       +1     

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@silvin-lubecki silvin-lubecki merged commit cae16e7 into docker:master Jul 9, 2020
@thaJeztah thaJeztah deleted the ignore_empty_configfile branch July 9, 2020 13:27
@thaJeztah thaJeztah added this to the 20.03.0 milestone Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants