Docker 如何标记图像并将其推送到GitHub';注册处?

Docker 如何标记图像并将其推送到GitHub';注册处?,docker,github,docker-registry,Docker,Github,Docker Registry,我目前运行我自己的注册表(基于),我将从代码生成的图像推送到该注册表。它很好用 我想试用GitHub的注册表,并遵循了他们的建议(以下是文档中的步骤摘要): 在我的例子中,我构建了一个最小的映像(仅在Dockerfile中从alpine创建),并尝试复制: > docker login -u WoJ -p f<...token...>9 docker.pkg.github.com WARNING! Using --password via the CLI is insecure

我目前运行我自己的注册表(基于),我将从代码生成的图像推送到该注册表。它很好用

我想试用GitHub的注册表,并遵循了他们的建议(以下是文档中的步骤摘要):

在我的例子中,我构建了一个最小的映像(仅在
Dockerfile
中从alpine创建),并尝试复制:

> docker login -u WoJ -p f<...token...>9 docker.pkg.github.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded

> docker build -t docker.pkg.github.com/WoJ/docker_repository/testing2:1 .
Sending build context to Docker daemon  2.048kB
Step 1/1 : FROM alpine
 ---> 965ea09ff2eb
Successfully built 965ea09ff2eb
Successfully tagged docker.pkg.github.com/WoJ/docker_repository/testing2:1

> docker push docker.pkg.github.com/WoJ/docker_respository/testing2:1
The push refers to repository [docker.pkg.github.com/WoJ/docker_respository/testing2]
An image does not exist locally with the tag: docker.pkg.github.com/WoJ/docker_respository/testing2
这很简单,哈哈:)

你打错了

您正在构建一个标记为
docker.pkg.github.com/WoJ/docker\u repository/testing2:1的图像

但是推送
docker.pkg.github.com/WoJ/docker\u respository/testing2:1

检查docker\u repository和docker\u respository:)两个名字中的那一部分。

这很简单,哈哈:)

你打错了

您正在构建一个标记为
docker.pkg.github.com/WoJ/docker\u repository/testing2:1的图像

但是推送
docker.pkg.github.com/WoJ/docker\u respository/testing2:1


检查docker\u repository和docker\u respo

这两个名称中的那部分:

问题似乎与Git回购的URL有关(不存在)。你能用例如:
docker build-t docker.pkg.github.com/woj/woj/testing2:1重试吗docker push docker.pkg.github.com/woj/woj/testing2:1
?我投票结束了这个问题(我自己的问题),因为这是一个打字错误→ 如果有人能强行删除,那就最好了。答案非常有帮助,我不想让回答者从+1和接受的答案中消失…@ErikMD:谢谢-但是这是一个打字错误(根据答案和我上面的评论)你只是想让我把问题作为话题外的问题来结束吗?这个问题似乎与Git回购的URL有关(不存在).你能用例如:
docker build-t docker.pkg.github.com/woj/woj/testing2:1.再试一次吗docker push docker.pkg.github.com/woj/woj/testing2:1
?我投票结束了这个问题(我自己的问题),因为这是一个打字错误→ 如果有人能强行删除,那就最好了。答案非常有帮助,我不想让回答者从+1和已接受的答案中消失…@ErikMD:谢谢-但这是一个打字错误(根据上面的答案和我的评论)你只想让我把这个问题作为离题来结束吗?
> docker login -u WoJ -p f<...token...>9 docker.pkg.github.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded

> docker build -t docker.pkg.github.com/WoJ/docker_repository/testing2:1 .
Sending build context to Docker daemon  2.048kB
Step 1/1 : FROM alpine
 ---> 965ea09ff2eb
Successfully built 965ea09ff2eb
Successfully tagged docker.pkg.github.com/WoJ/docker_repository/testing2:1

> docker push docker.pkg.github.com/WoJ/docker_respository/testing2:1
The push refers to repository [docker.pkg.github.com/WoJ/docker_respository/testing2]
An image does not exist locally with the tag: docker.pkg.github.com/WoJ/docker_respository/testing2
> docker images
REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
(...)
alpine                                                   latest              965ea09ff2eb        8 weeks ago         5.55MB
docker.pkg.github.com/WoJ/docker_repository/testing2   1                   965ea09ff2eb        8 weeks ago         5.55MB