To setup a proxy with docker that requires setting the HTTP_PROXY environment variable. In the latest release dev build of RancherOS (v0.3.1-rc2), this can be set through a configuration file. You can edit /var/lib/rancher/conf/docker and put the following in the file
export HTTP_PROXY=
http://example.comUpon restart or restarting the user docker (sudo system-docker restart docker) the environment variable will take effect. There are two issues with this approach though.
1) We can create that file during from cloud-init, so it is not possible to do this on first boot
2) This only impacts user docker and not system docker
I believe we should add a feature to RancherOS to make this easier. We will try to get this into RancherOS v0.3.1.
Darren