vultr日本主机centos7 docker-compose build时Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease

安装报错 · boolne · 于 5年前 发布 · 5129 次阅读
2-dev         libssl-dev         git         wget         ssh         libpcre3-dev         --no-install-recommends
 ---> Running in badef1ee6230
Ign http://deb.debian.org jessie InRelease
Get:1 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [825 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 28s (360 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y         libfreetype6-dev         librabbitmq-dev         libssh-dev         libjpeg62-turbo-dev         libmcrypt-dev         libpng12-dev         libicu-dev         libxml2-dev         libssl-dev         git         wget         ssh         libpcre3-dev         --no-install-recommends' returned a non-zero code: 100

第一次运行使用默认git下载的docker-compose.yml,在生成镜像后W:和E:后面错误,尝试把容器和镜像删除重新构建,尝试多次也没有用,包括重装centos,参考其它人的贴子或google并没找到有效的办法。复制docker-compose.yml.aliyun或docker-compose.yml.php.hub的内容时只出现以下内容。

[root@vultr yii2_fecshop_docker]# docker-compose build
mysql uses an image, skipping
mongodb uses an image, skipping
php uses an image, skipping
web uses an image, skipping
xunsearch uses an image, skipping
redis uses an image, skipping

之前尝试忽略这个错误按教学后面部分布署,但运行入口地址时报一堆错。请帮忙看下什么问题,谢谢

共收到 3 条回复 fecshop 问题提问
boolne#15年前 1 个赞
FROM php:7.1.13-fpm

RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list

# Install modules
RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        librabbitmq-dev \
        libssh-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng12-dev \

在“install modules”和from之间插入中间那段代码就可以了,解决办法来源(https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease/1424377)

abertobzq#24年前 0 个赞

楼上的拜托,是在哪个文件里插入。那段代码。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics