Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP_PROXY not working for docker runtime #161

Closed
kigawas opened this issue Feb 2, 2022 · 7 comments
Closed

HTTP_PROXY not working for docker runtime #161

kigawas opened this issue Feb 2, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@kigawas
Copy link

kigawas commented Feb 2, 2022

It seems colima does not respect HTTPS_PROXY when starting the vm

@kigawas
Copy link
Author

kigawas commented Feb 2, 2022

OK, after deleting the vm and starting with containerd context it works

@aruder77
Copy link

aruder77 commented Feb 8, 2022

it does not work with the docker daemon, though.

@abiosoft
Copy link
Owner

abiosoft commented Mar 7, 2022

@aruder77 is that still the case?

@aruder77
Copy link

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.

@abiosoft abiosoft changed the title How to set proxy for the daemon HTTP_PROXY not working for docker runtime Mar 14, 2022
@abiosoft abiosoft added the bug Something isn't working label Mar 14, 2022
@oglezglez
Copy link

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

@aruder77
Copy link

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...

@tkilloren
Copy link

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 '*'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants