docker報錯:denied: requested access to the resource is denied unauthorized: authentication required


IQiMmn

errors:
denied: requested access to the resource is denied
unauthorized: authentication required。

解決方案

  • 修改發布的鏡像的REPOSITORY為自己的賬戶名+鏡像,比如我的用戶名是123456。
docker tag  nginx  123456/nginx:1.0

7ot7aF

  • 然后發布鏡像
docker push 123456/nginx:1.0 

然后打開私人倉庫就可以了。

當然了。此時就出現了一個問題:出現了相同的鏡像,我們肯定不想要太多的鏡像。那么怎么刪除呢?

docker rmi 7e4d58f0e5f3? 不好意思。報錯

Error response from daemon: conflict: unable to delete 7e4d58f0e5f3 (must be forced) - image is referenced in multiple repositories

分析原因:

一個鏡像ID出現了兩個鏡像,系統肯定不知道刪除哪一個。

解決方案:

使用REPOSITORY:TAG結合來刪除。

比如:docker rmi 7e4d58f0e5f3:1.0

pJdQSs


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM