打开一个容器的终端
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 main non-free contrib' >> /etc/apt/sources.list
echo 'deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib' >> /etc/apt/sources.list
更新
apt-get update