devsapp / fc

阿里云函数计算(FC)组件
MIT License
139 stars 40 forks source link

debian9 镜像不支持 apt update 导致 build 不支持 apt-get.list 文件 #975

Closed wss-git closed 1 year ago

wss-git commented 1 year ago

原因

很多源已经不再支持 debian9

临时解决方案

进入到容器, 然后运行指令换源

rm /etc/apt/sources.list

printf "deb http://archive.debian.org/debian/ stretch main non-free contrib\ndeb http://archive.debian.org/debian/ stretch-updates main non-free contrib\ndeb http://archive.debian.org/debian/ stretch-backports main non-free contrib\ndeb-src http://archive.debian.org/debian/ stretch main non-free contrib\ndeb-src http://archive.debian.org/debian/ stretch-updates main non-free contrib\ndeb-src http://archive.debian.org/debian/ stretch-backports main non-free contrib\ndeb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib\ndeb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib\n" > /etc/apt/sources.list

将切换的源的容器打成一个新的镜像,然后在覆盖掉原来的镜像

docker commit <xxxx> registry.cn-beijing.aliyuncs.com/aliyunfc/xxxxxxx:build-1.10.8-beta

docker tag registry.cn-beijing.aliyuncs.com/aliyunfc/xxxxxxx:build-1.10.8-beta  registry.cn-beijing.aliyuncs.com/aliyunfc/xxxxxxx:build-1.10.8

Ref

https://github.com/aliyun/fc-docker/issues/209

wss-git commented 1 year ago

后面需要补发一个镜像版本支持 debian9 的源

wss-git commented 1 year ago

已经发布最新的镜像版本 1.10.9