centos7 运行 docker build -t javaweb:1 . 出现问题:Get “https://registry-1.docker.io/v2/“: dial tcp: lookup

news/2024/6/3 17:22:21 标签: docker, elasticsearch, 容器

docker_build_t_javaweb1__Get_httpsregistry1dockeriov2_dial_tcp_lookup_0">centos7 运行 docker build -t javaweb:1 . 出现问题:Get “https://registry-1.docker.io/v2/”: dial tcp: lookup

centos7 运行 docker build -t javaweb:1 . 出现问题:Get “https://registry-1.docker.io/v2/”: dial tcp: lookup
在这里插入图片描述

Trying to pull repository docker.io/library/elasticsearch ... 
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:50339->[::1]:53: read: connection refused

解决方法:

 vi /etc/resolv.conf 

加入:

nameserver 8.8.4.4
nameserver 8.8.8.8

后成功运行


http://www.niftyadmin.cn/n/1570417.html

相关文章

tomcat端口冲突怎么办?强制关闭端口的进程!

强制关闭端口的进程 打开命令窗口,根据端口号查询这个端口号的PID,以端口号8080为例: 进入命令窗口 执行命令:WINR 然后输入cmd netstat -ano|findstr "8080"如下图 查询到端口9001对应的pid为:43128 根据查出来的…

markdown 使用

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注…

mac os 下的 git使用

mac os 下的git使用 一、将本地文件上传到gitee上 cd /Users/macbook/Desktop/learngit git inittouch readme.mdgit add "readme.md"git status -sgit commit -m "gitos"git remote add origin gitgitee.com:cscyep/learngit.gitgit pull --rebase origi…

mac os git 使用具体流程

1、 git init (本地仓库初始化) 2、 git add * (将此文件夹下的所有文件添加到暂存区) 3、git status (查看仓库当前状态) 4、git commit -m “备注” (暂存区提交到仓库) 5、git remote add origin ssh下复制的地址 (与远程仓库…

js 从1开始 到第35个能被7和3整除的数是多少

for 循环 var num 1,cout 0,result 0;for (var i 1; i < num; i) {num;if (i % 3 0 && i % 7 0) {result i;cout;} else if (cout 35) {break;}}console.log(result);while循环 var i 1,count 0,result 0;while (count < 35) { i; if (i % 3 0 &…

js 简易ATM机

var money 0; //一开始没有钱while (1) {var num prompt(请输入您要的操作: \n 1、存钱 \n 2、取钱 \n 3、显示余额 \n 4、退出);switch (num) {case 1:var cmoney prompt(请输入您要存入的金额:);money parseFloat(cmoney);alert(您的余额是 money);break;case 2…

js 判断2月份多少天

function backDay() { //返回2月份的天数的函数var year prompt(请输入年份);if (isRunyear(year)) { //调用是否为闰年这个函数alert(这一年是闰年&#xff0c;2月份有29天);} else {alert(这一年是平年&#xff0c;2月份有28天);}}backDay(); fu…

c3 用ps查看精灵图的位置

1、用ps打开图片 2、找到图片所在位置 3、选择左边切片工具 4、框出你所需要的图片 5、右键选择 编辑切片选项 6、得到的x&#xff0c;y就是坐标 background: url(images/icon.png) no-repeat 0 -353px;