docker各種報錯解決方案小結
【問題1】Get “https://registry-1.docker.io/v2/“: context deadline exceeded
在docker pull redis 時顯示:Get “https://registry-1.docker.io/v2/“: context deadline exceeded
解決方法
修改DNS服務器
vim /etc/resolv.conf
在文件內修改如下
nameserver 8.8.8.8
重啟
sudo systemctl restart docker
問題反思
看到原文件內容為
nameserver 192.168.1.1
想起這是之前連接xshell的時候順帶配置的,沒想到現在影響了redis的pull。
【問題2】Error response from daemon
Error response from daemon: Get "https://index.docker.io/v1/search?q=mysql&n=25": dial tcp: lookup index.docker.io on 192.168.1.2:53: read udp 192.168.10.143:57022->192.168.1.2:53: i/o timeout
解決方法
/etc/docker/daemon.json內修改過期的鏡像
"registry-mirrors": ["https://registry.docker-cn.com"]
【問題3】IPv4 forwarding is disabled. Networking will not work
IPv4 forwarding is disabled. Networking will not work
解決方法
vim /etc/sysctl.conf
在文件內添加net.ipv4.ip_forward=1
systemctl restart network && systemctl restart docker
sysctl net.ipv4.ip_forward 返回1,問題解決
總結
到此這篇關于docker各種報錯解決方案的文章就介紹到這了,更多相關docker報錯解決內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
- Docker獲取鏡像報錯docker: Error response from daemon
- docker 報錯 Exited (1) 4 minutes ago的原因分析
- 安裝Docker Desktop報錯WSL 2 installation is incomplete的問題(解決報錯)
- Docker啟動失敗報錯Failed?to?start?Docker?Application?Container?Engine的解決辦法
- Docker報錯:OCI?runtime?exec?failed:?exec?failed:?container_linux.go:380:?starting?container?process的解決方法
- Docker報錯Operation?not?permitted問題的解決方法
相關文章
使用?Docker?Compose?構建復雜的多容器?App的方法
Docker Compose 工具相當于 C/C++ 的 make 工具,使用 make 需要 Makefile,所有的編譯鏈接設置都在Makefile 中指定,不需要為了運行程序而每次都在終端手動輸入長串的指令,這篇文章主要介紹了使用?Docker?Compose?構建復雜的多容器?App,需要的朋友可以參考下2022-04-04基于docker Desktop一鍵式搭建k8s環(huán)境的步驟
在docker desktop中一鍵啟動k8s環(huán)境很簡單,下面介紹如何啟動dashboard,dashboard儀表盤是新手學習k8s至關重要的一個工具,本文給大家介紹的非常詳細,感興趣的朋友一起看看吧2023-11-11