Chapter 3. Configure proxy settings on Linux
To configure proxy settings for Podman on Linux, you must configure Podman directly. This is needed because Red Hat build of Podman Desktop proxy settings have no effect on the Podman service when running on a Linux machine.
Prerequisites
-
You have a proxy URL in the format:
<your.proxy.tld:port>. - Optional: You have proxy Certificate Authorities (CAs) in Privacy-Enhanced Mail (PEM) format.
Procedure
To use a proxy in your containers, perform the following steps:
Open the
containers.conffile.NoteTo know about the
containers.conffile location, refer to the Control network traffic flow with proxy section.Set the value of the proxy environment variables to pass to the Podman engine in the file:
[engine] env = ["http_proxy=<your.proxy.tld:port>", "https_proxy=<your.proxy.tld:port>"]
[engine] env = ["http_proxy=<your.proxy.tld:port>", "https_proxy=<your.proxy.tld:port>"]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Optional: To use a custom CA in your proxy, perform the following steps:
Run the following command to copy the certificate to the Podman machine:
sudo cp proxy_ca.pem /etc/pki/ca-trust/source/anchors/
$ sudo cp proxy_ca.pem /etc/pki/ca-trust/source/anchors/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to add your proxy certificate to the trust store:
sudo update-ca-trust
$ sudo update-ca-trustCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Run the following command to restart all
podmanprocesses.pkill podman
$ pkill podmanCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
- Go to Images from the left navigation pane.
Click Pull an image.
-
Image to Pull: Enter an image name, such as
quay.io/podman/hello.
-
Image to Pull: Enter an image name, such as
-
Click Pull image. Red Hat build of Podman Desktop reports
Download completeafter a while. - Click Done.
You can access the image from an external repository.