更改docker镜像源为阿里云
1 2
| sudo vim /etc/docker/daemon.json cat /etc/docker/daemon.json
|
{
“registry-mirrors”: [“https://gvv1xf6d.mirror.aliyuncs.com"]
}
拉取系统镜像并运行:
1 2
| docker pull debian docker run -it debian bash
|
更改debian镜像源
1 2 3 4 5 6 7 8 9 10
| cd /etc/apt cp sources.list sources.list.bak echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" > sources.list.tsinghua echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >> sources.list.tsinghua echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >> sources.list.tsinghua echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >> sources.list.tsinghua mv sources.list.tsinghua sources.list apt install apt-transport-https ca-certificates sed -E -i 's/http/https/' sources.list apt update
|
docker commit e7f167a49946 wsd/testimg:1 # container id
docker run -it wsd/testimg:1 bash