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