1、第一次拉取镜像遇到的问题(OMG 天塌了)
Unable to find image 'nginx:1.26.2' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
解决方法:
#1、配置镜像仓库地址
root@ubuntu-1:~# cat /etc/docker/daemon.json
{
"registry-mirrors": [
"https://w14ki3ju.mirror.aliyuncs.com",
"http://hub-mirror.c.163.com",
"https://registry.docker-cn.com",
"https://docker.m.daocloud.io"
]
}
#2、重新加载配置并重启启动docker
root@ubuntu-1:~# systemctl daemon-reload
root@ubuntu-1:~# systemctl restart docker.service
完美解决,妈妈再也不用担心我的docker学习
2、 WARNING: bridge-nf-call-iptables is disabled 问题处理
今天在执行docker info的过程中遇到了WARNING: bridge-nf-call-iptables is disabled;WARNING: bridge-nf-call-ip6tables is disabled的问题(wtf 咋这么多问题,确定不是为难我胖虎?)
root@ubuntu:~# docker info
......
Registry Mirrors:
https://w14ki3ju.mirror.aliyuncs.com/
http://hub-mirror.c.163.com/
https://registry.docker-cn.com/
https://docker.m.daocloud.io/
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
让我们先看看为什么会出现bridge-nf-call-iptables is disabled
这个警告信息通常出现在Linux系统中,特别是当你使用iptables进行网络防火墙管理时。"bridge-nf-call-iptables"是一个系统参数,用于控制是否允许在IPv4数据包通过Linux网桥时,将IPv4数据包传递给iptables规则进行处理。
解决办法:
root@k8s1:~# modprobe br_netfilter
root@k8s1:~# cat /etc/sysctl.d/docker.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
root@k8s1:~# sysctl -p
版权归原作者 Ygnah_Z 所有, 如有侵权,请联系我们删除。