docker容器内部设置apt源和网络代理
# 进入容器,并更新容器的apt源
[root@server01 ~]# docker exec -it mynginx /bin/bash
# 更新nginx的apt源
tee /etc/apt/sources.list << EOF
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
EOF
设置apt-get的代理
cd /etc/apt
echo 'Acquire::http::Proxy "http://10.11.0.148:808";' >> apt.conf
echo 'Acquire::https::proxy "http://10.11.0.148:808";' >> apt.conf