首页 > 技术文章 > docker不能上传镜像到自己网站的仓库

pbblogs 2018-10-09 17:20 原文

错误提示如下:

1 WARNING! Using --password via the CLI is insecure. Use --password-stdin.
2 Error response from********: connect: connection refused

解决方法:

  官方的配置地址:https://docs.docker.com/engine/reference/commandline/dockerd/#options

  配置文件的默认路径:/etc/docker/daemon.json

 1 这是Linux上允许的配置选项的完整示例:
 2 
 3 {
 4     "authorization-plugins": [],
 5     "data-root": "",
 6     "dns": [],
 7     "dns-opts": [],
 8     "dns-search": [],
 9     "exec-opts": [],
10     "exec-root": "",
11     "experimental": false,
12     "storage-driver": "",
13     "storage-opts": [],
14     "labels": [],
15     "live-restore": true,
16     "log-driver": "",
17     "log-opts": {},
18     "mtu": 0,
19     "pidfile": "",
20     "cluster-store": "",
21     "cluster-store-opts": {},
22     "cluster-advertise": "",
23     "max-concurrent-downloads": 3,
24     "max-concurrent-uploads": 5,
25     "default-shm-size": "64M",
26     "shutdown-timeout": 15,
27     "debug": true,
28     "hosts": [],
29     "log-level": "",
30     "tls": true,
31     "tlsverify": true,
32     "tlscacert": "",
33     "tlscert": "",
34     "tlskey": "",
35     "swarm-default-advertise-addr": "",
36     "api-cors-header": "",
37     "selinux-enabled": false,
38     "userns-remap": "",
39     "group": "",
40     "cgroup-parent": "",
41     "default-ulimits": {},
42     "init": false,
43     "init-path": "/usr/libexec/docker-init",
44     "ipv6": false,
45     "iptables": false,
46     "ip-forward": false,
47     "ip-masq": false,
48     "userland-proxy": false,
49     "userland-proxy-path": "/usr/libexec/docker-proxy",
50     "ip": "0.0.0.0",
51     "bridge": "",
52     "bip": "",
53     "fixed-cidr": "",
54     "fixed-cidr-v6": "",
55     "default-gateway": "",
56     "default-gateway-v6": "",
57     "icc": false,
58     "raw-logs": false,
59     "allow-nondistributable-artifacts": [],
60     "registry-mirrors": [],
61     "seccomp-profile": "",
62     "insecure-registries": [],
63     "no-new-privileges": false,
64     "default-runtime": "runc",
65     "oom-score-adjust": -500,
66     "node-generic-resources": ["NVIDIA-GPU=UUID1", "NVIDIA-GPU=UUID2"],
67     "runtimes": {
68         "cc-runtime": {
69             "path": "/usr/bin/cc-runtime"
70         },
71         "custom": {
72             "path": "/usr/local/bin/my-runc-replacement",
73             "runtimeArgs": [
74                 "--debug"
75             ]
76         }
77     }
78 }

我的修改:

{
  "registry-mirrors": [],
  "insecure-registries": ["网址"],
  "debug": true,
  "experimental": false
}

 使用 docker login <私有镜像的网址>   登陆

 使用docker push上传

推荐阅读