Proxy Settings for RancherOS

you are right denise.

I actually tried setting proxy for both the user level and system level

sudo ros config set rancher.system_docker.environment '[http_proxy=<proxy>, https_proxy=<proxy>]'
sudo ros config set rancher.docker.environment '[http_proxy=<proxy>, https_proxy=<proxy>'
# restart docker daemon for proxy to take effect
sudo system-docker restart docker

I also added our corporate’s firewall proxy certificate to rancher’s trusted certificate

sudo -i -u root
cat <crt> >> /etc/ssl/certs/ca-certificates.crt

I verified I can now pull docker images down from user level docker

docker pull debian

how ever the system level docker still doesn’t work

sudo system-docker pull debian

because ros install actually uses system-docker to pull the rancher/os:v0.4.0, hence it won’t work, if the system-docker still can’t pull the images

In the end i still used the work around,

# pull the docker image from user level docker
docker pull rancher/os:v0.4.0
# export the rancher/os:v0.4.0 image to a tar file
docker save rancher/os:v0.4.0 > rancheros.tar
# import the rancher/os:v0.4.0 image tar file to system-docker level
sudo system-docker load < rancheros.tar
# you can verify that the system-docker does contain the rancher/os:v0.4.0 image
sudo system-docker images
# now the ros install works
sudo ros install -c cloud-config.yml -d /dev/sda

I think I saw some thread, some people saying to set the system-docker level proxy, you can edit some file which sets the proxy at kernel level. But I haven’t tried that