docker - 无法推送到远程 docker 注册表

标签 docker

当尝试将图像推送到远程 docker registry 时,我收到消息:

vagrant@vagrant-ubuntu-trusty-64:~/helloworld$ docker push 11.22.33.44:5000/ltrojanowski/helloworld
The push refers to a repository [11.22.33.44:5000/ltrojanowski/helloworld]
unable to ping registry endpoint https://11.22.33.44:5000/v0/
v2 ping attempt failed with error: Get https://11.22.33.44:5000/v2/: EOF
 v1 ping attempt failed with error: Get https://11.22.33.44:5000/v1/_ping: EOF

尽管将服务器上的 etc/default/docker 更改为如下所示:

# Docker Upstart and SysVinit configuration file

#
# THIS FILE DOES NOT APPLY TO SYSTEMD
#
#   Please see the documentation for "systemd drop-ins":
#   https://docs.docker.com/engine/articles/systemd/
#

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="--insecure-registry 11.22.33.44:5000"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

我只添加了 DOCKER_OPTS="--insecure-registry 11.22.33.44:5000" 行,如 documentation 中所述. 非常感谢您的帮助。

最佳答案

正如评论中所建议的,我误解了指令。需要在推送容器的机器中添加行 DOCKER_OPTS="--insecure-registry 11.22.33.44:5000",而不是注册表机器。

关于docker - 无法推送到远程 docker 注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36476180/

相关文章:

docker - 在使用docker环境的MLflow项目中,如何设置AWS凭证

docker - 如何在 kubernetes 内运行的 jenkins 管道中运行 sidecar 容器

python-3.x - 无法在 Ubuntu 上将 Splash 安装到 Docker 上

swift - 运行Kitura Docker Image导致libmysqlclient.so.18错误

java - 使用 Docker for Mendix 可以带来什么不同?

docker-compose v3 将文件夹名称添加到网络名称之前

docker - Docker 镜像上的 pip 找不到 Rust - 即使安装了 Rust

docker - 新的 minikube 安装在启动时挂起(ssh 错误)

bash - Shell-以大写形式导出变量名称

Dockerfile ~ 添加 Windows 文件夹的正确语法