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

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #docker #jenkins #proxy.

This post was filed under articles.

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.