更新报错示例
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Ign http://deb.debian.org jessie-backports InRelease
Get:3 http://deb.debian.org jessie Release.gpg [1652 B]
Ign http://deb.debian.org jessie-backports Release.gpg
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [992 kB]
Get:5 http://deb.debian.org jessie Release [77.3 kB]
Ign http://deb.debian.org jessie-backports Release
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Get:8 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://deb.debian.org jessie-backports/main amd64 Packages
Err http://deb.debian.org jessie-backports/main amd64 Packages
Err http://deb.debian.org jessie-backports/main amd64 Packages
Err http://deb.debian.org jessie-backports/main amd64 Packages
Err http://deb.debian.org jessie-backports/main amd64 Packages
404 Not Found
Fetched 2321 kB in 8min 7s (4760 B/s)
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
下载工具报错示例
root@metadata-manage-data-d795fc5f9-zv8jv:/usr/local/app/metadata-manage-data# apt-get install -y tcpdump
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package tcpdump
root@metadata-manage-data-d795fc5f9-zv8jv:/usr/local/app/metadata-manage-data# apt-get install -y telnet
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package telnet
解决方法
在项目的Dockerfile增加如下配置
RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN apt-get install -y vim
RUN apt-get install -y telnet
RUN apt-get install -y net-tools
//可以继续安装需要的linux命令工具