4x99 / code6

码小六 - GitHub 代码泄露监控系统
GNU General Public License v3.0
1.12k stars 201 forks source link

docker build -t code6 . 报错未解决 #177

Closed test502git closed 2 years ago

test502git commented 2 years ago

安装时报错,同样的环境,以前不会,现在安装什么版本都报错,测试最新版与近3个老版

Reading package lists... W: Failed to fetch http://mirrors.aliyun.com/debian/dists/buster/InRelease Temporary failure resolving 'mirrors.aliyun.com' W: Failed to fetch http://mirrors.aliyun.com/debian/dists/buster-updates/InRelease Temporary failure resolving 'mirrors.aliyun.com' W: Some index files failed to download. They have been ignored, or old ones used instead. Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package zip E: Unable to locate package cron E: Unable to locate package vim E: Unable to locate package zlib1g-dev E: Unable to locate package libpng-dev

yoonper commented 2 years ago

报错提示从阿里云镜像下载失败,配置个 DNS 试试。

test502git commented 2 years ago

这样吗,请问在哪里配置的

test502git commented 2 years ago

宿主机可以访问http://mirrors.aliyun.com/debian/dists/buster/InRelease 应该是容器中不能访问,

test502git commented 2 years ago

我测试了,在两个不同的云服务中,安装都报同样的错

yoonper commented 2 years ago

明早我确认一下镜像是否有问题

test502git commented 2 years ago

docker -v Docker version 20.10.10, build b485636

谢谢,非常感谢

test502git commented 2 years ago

又试了一台vps,还是一样,估计是镜像问题

yoonper commented 2 years ago

在看了,稍等一下

yoonper commented 2 years ago

我这里没有复现,你可以尝试一下,在宿主机

vim /etc/docker/daemon.json

加入

{
  "dns": ["223.5.5.5"]
}

重启 Docker 后重新 build 镜像

test502git commented 2 years ago

修改 vim /etc/docker/daemon.json 已解决