使用docker-compose构建成功创建镜像后,无法标记docker镜像(来自守护程序的错误响应)

rsl1atfo  于 2023-06-21  发布在  Docker
关注(0)|答案(1)|浏览(187)
PS C:path> docker-compose up --build      
[+] Building 0.0s (0/0)
...
...

我想这是成功的

PS C:path> docker-compose ps
NAME                IMAGE                    COMMAND                  SERVICE             CREATED             STATUS              PORTS
kafka               wurstmeister/kafka       "start-kafka.sh"         kafka               2 hours ago         Up 2 hours          0.0.0.0:9092->9092/tcp
mysql               mysql:latest             "docker-entrypoint.s…"   db                  2 hours ago         Up 2 hours          0.0.0.0:3306->3306/tcp, 33060/tcp
zookeeper           wurstmeister/zookeeper   "/bin/sh -c '/usr/sb…"   zookeeper           2 hours ago         Up 2 hours          22/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp
PS C:path> docker tag backend:latest xxx.dkr.ecr.region.amazonaws.com/backend:latest
Error response from daemon: No such image: backend:latest

运行docker images

REPOSITORY                                 TAG       IMAGE ID       CREATED         SIZE
mysql                                      latest    c71276df4a87   8 days ago      565MB
ambassador/telepresence-docker-extension   1.0.8     bb2143440bbd   2 weeks ago     528MB
ambassador/telepresence-docker-runtime     1.0.8     a1a178ca4417   2 weeks ago     21.3MB
redis                                      latest    0ec8ab59a35f   2 weeks ago     117MB
postgres                                   15.2      bf700010ce28   5 weeks ago     379MB
docker/welcome-to-docker                   latest    b1eb53af308a   7 weeks ago     13.6MB
wurstmeister/kafka                         latest    a692873757c0   12 months ago   468MB
wurstmeister/zookeeper                     latest    3f43f72cb283   4 years ago     510MB
wlzqhblo

wlzqhblo1#

首先,您需要检查图像是否存在。下面的命令可以列出图像。

docker images

之后,您可以标记图像并将其推送到远程存储库。

docker tag backend:latest xxx.dkr.ecr.region.amazonaws.com/backend:latest && docker push xxx.dkr.ecr.region.amazonaws.com/backend:latest

相关问题