Docker 获取容器镜像报错

Dokcer 获取容器镜像报错

[[email protected] ~]# docker pull nginx
Using default tag: latest
Trying to pull repository docker.io/library/nginx ...
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

因为在下载官方镜像点的镜像国内访问速度太慢,所以报错,使用加速器就可以解决这个问题

首先打开配置文件daemon.json,centos上安装后有此文件,但是ubuntu上需要自己创建文件:
[[email protected] ~]# vim /etc/docker/daemon.json
在文件中加入:
{
"registry-mirrors":["https://docker.mirrors.ustc.edu.cn"]
}

然后重启守护进程:
[[email protected] ~]# systemctl daemon-reload
[[email protected] ~]#systemctl restart docker

可以使用阿里的加速器:https://yq.aliyun.com/articles/29941

原文地址:http://blog.51cto.com/pengjc/2316566

时间: 2024-10-10 15:00:06

Docker 获取容器镜像报错的相关文章

Error response from daemon ... no space left on device docker启动容器服务报错

docker 启动容器服务的时候,报错no space left on device 1. 检查磁盘是否用光 3.检查inode是否耗光,从截图看到是inode耗光导致出现问题: 进入到/run里面看看是哪些文件耗光了:#for i in ./*; do echo $i; find $i | wc -l; done查看到最大的是/run/docker/libcontainerd/下面一部分容器耗光的.该目录的结构是:/run/docker/libcontainerd/2b9251bcc7a448

zun 不能创建 docker 容器,报错: datastore for scope "global" is not initialized

问题:zun不能创建docker容器,报错:datastore for scope "global" is not initialized 解决:修改docker 服务配置文件: [[email protected] ~]# cat /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.

Docker容器互联网络报错:WARNING: IPv4 forwarding is disabled. Networking will not work.解决办法(centos7)

Docker容器互联网络报错:WARNING: IPv4 forwarding is disabled. Networking will not work. 解决办法: echo net.ipv4.ip_forward=1 >> /usr/lib/sysctl.d/00-system.conf systemctl restart network 原文地址:https://www.cnblogs.com/pqshen/p/12159955.html

关于socket模块获取ip失败报错

问题:socket模块获取ip失败报错 In [64]: import socket In [71]: socket.gethostname() Out[71]: 'web01' In [72]: host_name = socket.gethostname() In [73]: socket.gethostbyname(host_name) --------------------------------------------------------------------------- g

Docker获取镜像报错docker: Error response from daemon

docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled今天在使用docker获取镜像时,出现了镜像获取报错的问题,找到了解决的方法记一下. 一.问题 ? ~ docker search sameersbnError response from daemon: Get https://index.docker.io/v1/search?q=sameers

Docker删除镜像报错

问题描述: 笔者意图删除nginx-file的镜像文件,但通过命令删除镜像时出现报错信息,提示存在多个引用(即一个IMAGE可被多个REPOSITORY引用,故删除会出现失败),如下: [[email protected] ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE kazihuo/nginx v1 60c22883bb42 6 minutes ago 372 MB nginx-file v1 60c22883bb42 6 min

docker 1.12.3版本搭建私有仓库,上传镜像报错:server gave HTTP response to HTTPS client”

系统环境:centos7 docker版本: 1.12.3(注意版本,可能存在不同版本设置不同的情况) docker registry版本:2.4.1 问题: 成功安装docker registry,在浏览器中输入http://192.168.1.100:5000/v2,成功返回json数据.在push 到docker registry时,报: [[email protected] sysconfig]# docker push 192.168.1.100:5000/registry:2.4.1

dokcer 容器启动报错

docker启动报错: 1.原因是由于是被暴力关机了,到时候docker挂载的磁盘没能自动umount掉,因此启动的时候再次挂载失败. 解决方法: 1.关闭docker 进程, 2.df -h一下,手动umount 掉关在的磁盘: 3.umount /var/lib/docker/devicemapper/mnt/125acc93753cad32adc056aad8a909aad8ae38a3ceafe677198efe8131b13fc7 4.启动docker进程,docker daemon 

Docker中启动mysql报错: Failed to get D-Bus connection

docker版本: [[email protected] ~]# docker versionClient: Version:         1.10.3 API version:     1.22 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64 Go version:      go1.6.3 Git commit:      d381c64-unsupported Built:           Thu Aug