0%

Docker推送镜像遇到的问题

denied: requested access to the resource is denied

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The push refers to repository [docker.io/library/flask-mark-12306-captcha]
0566a0ade762: Preparing
a82f13d5c08d: Preparing
6680b518709b: Preparing
42d3338c1387: Preparing
380d9d1be624: Preparing
5bf497fc7ae4: Waiting
079e0a70bca0: Waiting
569e5571a3eb: Waiting
697765a85531: Waiting
8c39f7b1a31a: Waiting
88cfc2fcd059: Waiting
760e8d95cf58: Waiting
7cc1c2d7e744: Waiting
8c02234b8605: Waiting
denied: requested access to the resource is denied

解决

push 的时候加上用户名

1
docker push <username>/<image name>:<tag name>

An image does not exist locally with the tag

1
2
3
(base) root@ubuntu:/home/ubuntu/docker/python/FlaskMark12306Captcha# docker push wudinaonao/flask-mark-12306-captcha:v1
The push refers to repository [docker.io/wudinaonao/flask-mark-12306-captcha]
An image does not exist locally with the tag: wudinaonao/flask-mark-12306-captcha

解决

本地不存在指定的镜像,可能构建镜像的时候没有指定tag

1
docker tag <old image name> <username>/<new image name>:<tag name>

例如

1
docker tag flask-mark-12306-captcha wudinaonao/flask-mark-12306-captcha:v1

完成

20200609193818