docker容器内debian系统配置国内镜像源

    1. 进入 docker 容器

    $ docker exec -it 4a21b5ee9275 /bin/bash
    

    2. 查看debian系统版本

    # cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
    NAME="Debian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    

    3. 确认版本后配置国内镜像源(本例版本代号为bullseye)

    # echo "deb http://mirrors.aliyun.com/debian bullseye main" >/etc/apt/sources.list
    # echo "deb http://mirrors.aliyun.com/debian-security bullseye-security main" >>/etc/apt/sources.list
    # echo "deb http://mirrors.aliyun.com/debian bullseye-updates main" >>/etc/apt/sources.list
    

    发表回复

    您的邮箱地址不会被公开。 必填项已用 * 标注

    此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据