--- title: '解决 docker Warning: Error loading config.json' date: 2020-02-18 is_modified: false disqus: cynthiahackmd categories: - "資訊科技 › 開發與輔助工具" tags: - "Docker" - "Linux/Unix" --- {%hackmd @CynthiaChuang/Github-Page-Theme %} <br> 有夠莫名其妙的,重開個的機。docker 指令莫名其妙就爛掉的 orz ... 雖然這條 Warning 不影響使用,但一直出現還是很討厭阿 QAQ <!--more--> ## 問題描述與釐清 某天~~睡醒~~忽然出現的的 WARNING,不影響使用但超煩! ``` WARNING: Error loading config file: /home/Cynthia_Chuang/.docker/config.json: stat /home/Cynthia_Chuang/.docker/config.json: permission denied ``` ## 解決辦法 1. 添加使用者 ```bash= $ sudo gpasswd -a ${USER} docker ``` 2. 重起 docker-daemon ```bash= $ sudo systemctl restart docker ``` 3. 設置權限 ```bash= $ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R $ sudo chmod g+rwx "/home/$USER/.docker" -R ``` ## 參考資料 1. kan2016 (2019-01-10)。[解决WARNING: Error loading config file: /home/kang/.docker/config.json: stat /home/kang/.docker/conf](https://blog.csdn.net/kan2016/article/details/86242571) 。檢自 运维 kan2016的博客 CSDN博客 (2020-02-18)。 <br><br> > **本文作者**: 辛西亞.Cynthia > **本文連結**: [辛西亞的技能樹](https://cynthiachuang.github.io/Fix-Docker-Warning-Error-loading-configjson) / [hackmd 版本](https://hackmd.io/@CynthiaChuang/Fix-Docker-Warning-Error-loading-configjson) > **版權聲明**: 部落格中所有文章,均採用 [姓名標示-非商業性-相同方式分享 4.0 國際](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en) (CC BY-NC-SA 4.0) 許可協議。轉載請標明作者、連結與出處!
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up