colima
colima copied to clipboard
HTTP_PROXY not working for docker runtime
It seems colima does not respect HTTPS_PROXY when starting the vm
OK, after deleting the vm and starting with containerd context it works
it does not work with the docker daemon, though.
@aruder77 is that still the case?
I just tried with colima version 0.3.4. The HTTP(S)_PROXY is honored when using containerd, but it is not working when using the docker daemon. Images cannot be pulled via proxy in this case.
Trying to help... As a workaround Into the vm (colima ssh), I have edited the docker service file (/etc/init.d/docker) to set HTTP_PROXY variables directly: export HTTP_PROXY=192.168.5.2:8888 export HTTPS_PROXY=192.168.5.2:8888
after a vm restart (colima stop, colima start) I can pull images using the proxy
Trying to help... As a workaround Into the vm (colima ssh), I have edited the docker service file (/etc/init.d/docker) to set HTTP_PROXY variables directly: export HTTP_PROXY=192.168.5.2:8888 export HTTPS_PROXY=192.168.5.2:8888
after a vm restart (colima stop, colima start) I can pull images using the proxy
Great! That works! Thanks for you help. I can live with this workaround for now...
Looks like lima will copy your proxy env vars into /etc/environment already . Alpine uses openrc to start services. Openrc blocks passing the env vars into the start up scripts unless you set it to allow them in the /etc/rc.conf.
I run echo 'rc_env_allow="*"'|colima ssh -- sudo tee -a /etc/rc.conf then stop and start Colima and it seems to do the trick. I can't seem to get it to work when specifying the individual proxy vars and had to resort to using the '*'.