因为该源是不用GPG验证的,可能不安全,但因为docker容器没有验证GPG的工具所以只能先用这个源,最后再换回正式源。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #复制原文件备份 mv/etc/apt/sources.list/etc/apt/sources.list.bak #修改sources.list cat <<EOF >/etc/apt/sources.list deb http...
导航 一、备份/etc/apt/sources.list root@nginx-demo-deployment-59fbc48594-8gns5:/#mv/etc/apt/sources.list /etc/apt/sources.list.bak 二、写入阿里源内容 cat > /etc/apt/sources.list << EOF deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free deb-src http://mirro...
docker exec -it php56fpm /bin/bash 以下均在容器的终端里操作 备份 cp /etc/apt/sources.list /etc/apt/sources.list.bak 写入国内源 echo 'deb http://mirrors.163.com/debian/ stretch main non-free contrib' > /etc/apt/sources.list echo 'deb http://mirrors.163.com/debian/ stretch-updates ...
【Docker】docker容器内apt换源 因为该源是不用GPG验证的,可能不安全,但因为docker容器没有验证GPG的工具所以只能先用这个源然后安装GPG验证相关软件包再更换回正式源。 步骤 mv /etc/apt/sources.list /etc/apt/sources.list.bak cat <<EOF >/etc/apt/sources.list deb http://mirrors.ustc.edu.cn/debian s...
docker容器内apt-get换源 #复制原文件备份 mv/etc/apt/sources.list /etc/apt/sources.list.bak #修改sources.list cat<<EOF >/etc/apt/sources.list deb http://mirrors.ustc.edu.cn/debian stable main contrib non-freedeb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-freeEOF...