dockerfilepodmanpodman-compose

How to use proxy during build time in podman


I want to build my image using custom Dockerfile. It should be connected to a proxy to download some files. I there anyway to do that?


Solution

  • Bash ENV http_proxy

    Based on this link the best way is to using bash environment proxies!

    You can use the bash env proxies!

    export http_proxy=http://127.0.0.1:8088 https_proxy=http://127.0.0.1:8088
    

    It even supports socks5 protocol:

    export http_proxy=socks5://127.0.0.1:8088 https_proxy=socks5://127.0.0.1:8088