Docker-提取失败,请求错误

Docker-提取失败,请求错误,docker,dockerfile,Docker,Dockerfile,我试图用必要的扩展构建一个php映像,但是当它试图下载libssl归档文件时,它失败了,出现了一个400错误 这是我得到的错误 E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/o/openssl1.0/libssl1.0.2_1.0.2u-1~deb9u2_amd64.deb 400 Bad Request [IP: 151.101.0.204 80] E: Unable to f

我试图用必要的扩展构建一个php映像,但是当它试图下载libssl归档文件时,它失败了,出现了一个400错误

这是我得到的错误

E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/o/openssl1.0/libssl1.0.2_1.0.2u-1~deb9u2_amd64.deb  400  Bad Request [IP: 151.101.0.204 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我尝试过使用apt-get-update和--fix-missing,这两种方法似乎都不起作用。 我也可以访问我的计算机上指定的档案,没有问题,所以我不明白为什么docker无法下载该文件

这是到目前为止我的Dockerfile

FROM php:7.0-apache

ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/

RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
    install-php-extensions calendar exif gd gettext intl mcrypt mysqli pcntl pdo_mysql shmop sockets sysvmsg sysvsem sysvshm wddx xdebug xsl zip

我想尝试隔离导致错误的扩展,但每当我删除一个扩展时,它都不起作用,如果我一次删除多个扩展,有时它会起作用。最后我试着把名单一分为二,看看这是否奏效。这两个一半都可以自己建造

我决定将扩展列表拆分为两个声明,因此我的Dockerfile现在如下所示:

FROM php:7.0-apache

ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/

RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
    install-php-extensions calendar exif gd gettext intl mcrypt mysqli pcntl pdo_mysql && \
    install-php-extensions shmop sockets sysvmsg sysvsem sysvshm wddx xdebug xsl zip