2018-11-17

如何修改Docker里的源

In order to apt install, I need to change sources in /etc/apt/sources.list file.


However we don't have any editor, we can only using bash command echo to insert the source address to the file. The command is as following:


PS: source address in here and here




[code]
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
[/code]



then update:

apt-get update -y && apt-get -y upgrade

没有评论:

发表评论

谢谢您的留言^_^

Ubuntu SSR setting

使用electron-ssr客户端 https://github.com/shadowsocksrr/electron-ssr 设置proxy