Inheriting the Proxy from the Jenkins Host in Docker
If you're working in a corporate environment, it's likely you're working with a proxy to restrict outbound traffic.
This can complicate things a little if you're using containerised builds in Jenkins, as they won't, by default, know how to reach outbound via the proxy, unless you add some extra configuration to your images.
You could hardcode them, but then you would need to go round updating all these variables in the future, when settings change, so it's worth always pulling what the host provides.
Fortunately, we can follow the instructions in Inheriting the Environment Variables from the Jenkins Host in Docker, providing the argument:
-e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy