如何解决 Docker 上的“无法获取 Debian Jessie-updates"问题? [英] How to fix 'Failed to fetch Debian Jessie-updates' issue on Docker?

查看:42
本文介绍了如何解决 Docker 上的“无法获取 Debian Jessie-updates"问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的码头工人工作正常.我重置了 Docker 的磁盘映像,然后当我运行docker-compose up -d"命令时.

My docker was working fine. I reset the disk image of Docker and then when I run the 'docker-compose up -d' command.

我开始收到无法获取 http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

I started to get "Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

E: 某些索引文件下载失败.它们已被忽略,或使用旧的.

E: Some index files failed to download. They have been ignored, or old ones used instead.

" 错误.

我的 DockerFile 是

My DockerFile is

    FROM php:7.1.16-apache

   #install all the system dependencies and enable PHP modules
   RUN apt-get update && apt-get install -y 
  libicu-dev 
  libpq-dev 
  libmcrypt-dev 
  git 
  zip 
  unzip 
  python 
  python-setuptools 
  libmemcached-dev 
&& pecl install memcached 
&& rm -r /var/lib/apt/lists/* 
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd 
&& docker-php-ext-install 
  intl 
  mbstring 
  mcrypt 
  pcntl 
  pdo_mysql 
  pdo_pgsql 
  pgsql 
  zip 
  opcache 
&& docker-php-ext-enable memcached 
&& pecl install -o -f redis 
&&  rm -rf /tmp/pear 
&&  docker-php-ext-enable redis


   RUN pecl install xdebug

   RUN easy_install supervisor

   #RUN echo_supervisord_conf > /etc/supervisord.conf

   ADD supervisord.conf /etc/supervisord.conf

   ADD php.ini $PHP_INI_DIR/php.ini

   #RUN echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so" to php.ini

   VOLUME /var/www/html

   WORKDIR /var/www/html

   #install composer
   RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer

   #set our application folder as an environment variable
   ENV APP_HOME /var/www/html

   #change uid and gid of apache to docker user uid/gid
   RUN usermod -u 1000 www-data && groupmod -g 1000 www-data

   #change the web_root to laravel /var/www/html/public folder
   RUN sed -i -e "s/html/html/public/g" /etc/apache2/sites-enabled/000-default.conf

   # enable apache module rewrite
   RUN a2enmod rewrite

   #copy source files and run composer
   #COPY . $APP_HOME

   # install all PHP dependencies
   #RUN composer install --no-interaction

   #change ownership of our applications
   RUN chown -R www-data:www-data $APP_HOME

   ADD startup.sh /root/

   RUN chmod 755 /root/startup.sh

   CMD ["/root/startup.sh"]

我该如何解决这个问题?

How can I fix the issue?

推荐答案

添加

运行 sed -i '/jessie-updates/d'/etc/apt/sources.list

在你的行之前

运行 apt-get update &&apt-get install -y ......

这篇关于如何解决 Docker 上的“无法获取 Debian Jessie-updates"问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆