找回密码
 立即注册
因Docker官网和国内镜像网站均不可访问,需科学上网浏览。只设置威联通的Container Station通过代理上网,不影响NAS上的其他应用。
方法是PC安装上网软件,编辑NAS上的run-docker.sh文件,添加代理代码。
run-docker.sh文件路径是:/share/CACHEDEV1_DATA/.qpkg/container-station/script
通过WinSCP或FinalShell访问,将run-docker.sh文件下载下来。用文本编辑器打开,倒数第二行添加如下代码:
export http_proxy="http://192.168.1.2:7890"
export https_proxy="http://192.168.1.2:7890"
export no_proxy= "192.168.168.0/24,localhost,127.0.0.1"
0240715145206.jpg

其中 192.168.1.2为电脑的IP,7890为软件端口。
保存后上传到NAS,重启Container Station使之生效。


此外还可纯命令添加代码,使用PuTTY登录NAS。
依次输入以下代码:
sudo -i
cd /share/CACHEDEV1_DATA/.qpkg/container-station/script
vi run-docker.sh
添加代码:

export http_proxy="http://192.168.1.2:7890"
export https_proxy="http://192.168.1.2:7890"
export no_proxy= "192.168.168.0/24,localhost,127.0.0.1"

按Esc,输入:wq回车退出
/etc/init.d/container-station.sh restart

0 个回复

您需要登录后才可以回帖 登录 | 立即注册