errors:
denied: requested access to the resource is denied
unauthorized: authentication required。
解決方案
- 修改發布的鏡像的
REPOSITORY
為自己的賬戶名+鏡像,比如我的用戶名是123456。
docker tag nginx 123456/nginx:1.0
- 然后發布鏡像
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