如何解决Docker:如果注册表不安全,则Pull失败
我正在使用以下具有docker版本(服务器版本:18.09.1-ol)的操作系统,
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 7.8
Release: 7.8
Codename: n/a
下面是docker info的输出。
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 2
Server Version: 18.09.1-ol
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: oqdwha5vq4okonfobaloxl48x
Is Manager: true
ClusterID: ugoobyidk9zrd6mzb37gsp81q
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 10.157.149.235
Manager Addresses:
10.157.149.235:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version: N/A
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1127.el7.x86_64
Operating System: Oracle Linux Server 7.8
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.56GiB
Name: ech-10-157-149-235
ID: TFZJ:3M3N:AWIY:U4AC:PK7S:NQJK:SXXO:CEDL:4PF7:3LVD:QFVS:Z6CJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 38
Goroutines: 158
System Time: 2020-09-28T09:33:37.73528739-05:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
xxxxxxxxx:xxxx
xxxxxxxxx:xxxx
Registry Mirrors:
xxxxxxxxx:xxxx
Live Restore Enabled: false
Product License: Community Engine
Registries: docker.io (secure)
问题是,我能够从dockerHub成功提取图像。但是,从不安全的注册表中拉出时出现以下错误。
net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
- 我已将不安全的注册表添加到/ etc / hosts
- 我已将不安全的注册表添加到/etc/docker/daemon.json
- 我还尝试过在“ /etc/systemd/system/docker.service.d”中的conf文件中添加不安全的注册表。
任何建议都值得赞赏。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。