https://rancher.com/ logo
Title
a

acoustic-refrigerator-10961

12/13/2022, 5:08 PM
Having trouble getting rancher desktop to use my proxy. Tried using these steps If I start dockerd and manually set
DOCKER_HOST=unix://$HOME/.rd/docker.sock
I am able to pull images and run containers. Port forwarding works. But the UI never even attempts to use the mitmproxy. I've set the self-signed certificate to be trusted both inside the VM and on my host machine. So no kubernetes since it can't even list possible versions.
f

fast-garage-66093

12/14/2022, 12:14 AM
I would have thought that configuring the proxy globally would work. E.g. create
~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml
with the settings:
env:
  HTTPS_PROXY: <http://10.10.10.10:80>
  HTTP_PROXY: http:/10.10.10.10:80
If this doesn't work (you may need to set
NO_PROXY
to avoid locations), you can also set the variable just for the
docker
service by editing
/etc/init.d/docker
:
supervise_daemon_args="--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\""
supervise_daemon_args="-e HTTPS_PROXY=<http://127.0.0.1:3128> $supervise_daemon_args"
Only the 2nd line is new; I've include the first line to show where to insert it. This is not really a supported way of doing it though, and may break functionality in the upcoming 1.7 release.
Try the
override.yaml
approach first!
Note that if the proxy is running on your host, you cannot specify
127.0.0.1
or
localhost
as the proxy address; you need the actual IP address because you are inside the VM and want to reach the host. You may be able to use
host.rancher-desktop.internal
.
a

acoustic-refrigerator-10961

12/14/2022, 3:25 AM
I am using a 10.x address that I have tested is reachable from the VM and included that address with in my NO_PROXY. I'm not sure that there is anything wrong with the VMs config since curl and docker pull work no problem. It's just the rancher desktop client that seems to be ignoring my proxy. Will try those suggestions tomorrow. Thanks!
So it doesn't look like there is any issues with docker containers hitting the internet, but the rancher desktop client running on Mac (not in the VM) seems to ignore my proxy. It tries to call out to https://desktop.version.rancher.io/ directly.
I noticed that curl requires the var to be lower case.
Rancher desktop appears to ignore it regardless of case.