本地Docker项目执行docker-compose up时出现镜像拉取权限错误
问题原因分析
执行docker-compose up时的报错:
ahmed@ahmed-HP-ProBook-430-G1:~/komodefi-app$ sudo docker-compose up Pulling mm2 (komodefi/mm2:0.1)... ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing. Continue with the new image? [yN]y Pulling mm2 (komodefi/mm2:0.1)... ERROR: pull access denied for komodefi/mm2, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
本地已存在的镜像:
REPOSITORY TAG IMAGE ID CREATED SIZE komodefi/mm2-frontend 0.1 7a7bdda36cd5 5 days ago 1.08GB komodefi/mm2-middleware 0.1 def632e9d4b6 5 days ago 461MB easyengine/cron v4.6.5 24c22a14fb21 16 months ago 19.9MB hello-world latest feb5d9fea6a5 17 months ago 13.3kB
问题原因:
- 你的
docker-compose.yml中mm2服务指定的镜像为komodefi/mm2:0.1,但本地仅存在komodefi/mm2-frontend:0.1和komodefi/mm2-middleware:0.1,没有匹配的komodefi/mm2:0.1镜像。 - 之前提示“镜像已被移除”,说明该镜像曾经存在但现在已被删除,Docker尝试重新拉取这个镜像。
- 拉取失败是因为
komodefi/mm2这个仓库在Docker Hub上不存在,或者是私有仓库,你没有登录对应的账号获取拉取权限,因此被拒绝访问。
内容的提问来源于stack exchange,提问作者artistAhmed
相关产品推荐
相关产品推荐

