Using a proxy in your containers on macOS and Windows
You can configure your Podman machine to use a proxy for your containers.
Prerequisites
<your.proxy.tld:port>: Your proxy URL.
Procedure
-
Open a shell prompt on the Podman machine:
$ podman machine ssh -
Edit the
containers.conffile to pass the proxy environment variables to Podman CLI.The file location depends on your connection mode:
-
rootless:$HOME/.config/containers/containers.conf -
rootful:/etc/containers/containers.conf
-
-
Set the proxy environment variables to pass into the containers:
[containers]
http_proxy = true
env = ["http_proxy=<your.proxy.tld:port>", "https_proxy=<your.proxy.tld:port>"] -
Go to Settings > Resources and restart the Podman machine.