Re: Web proxy support in buildpacks


Jack Cai
 

Thanks JT for your answer. Based on our experience, one of the best
practice to share is that it's a good idea to set all the below four
environment variables:

http_proxy, HTTP_PROXY, https_proxy, HTTPS_PROXY

The reason is that it seems different tools/runtimes recognize different
set of them. E.g, curl does not recognize "HTTP_PROXY" according to [1].

Jack

[1] http://curl.haxx.se/docs/manpage.html

On Mon, Aug 17, 2015 at 9:39 AM, JT Archie <jarchie(a)pivotal.io> wrote:

Jack,

For cached buildpacks, it would not be useful to set HTTP proxying. The
dependencies are bundled with the buildpack and are loaded via the local
file system, not HTTP.

Most of the buildpacks use curl to download the dependencies from the HTTP
server. You should be able to set the environment variables HTTP_PROXY or
HTTPS_PROXY to for curl to use the proxy server.
<http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html> If this works for you
it would be great to hear your feedback.

Kinds Regards,

JT

On Mon, Aug 17, 2015 at 9:26 AM, Jack Cai <greensight(a)gmail.com> wrote:

Currently I see that the Java buildpack and the PHP buildpack explicitly
mentioned in their doc that they can run behind a Web proxy, by setting the
HTTP_PROXY and HTTPS_RPOXY environment variable. And I suppose this is
supported in either the cached version or the uncached one, and for both
the old lucid64 stack and the new cflinuxfs2 stack (which has different
Ruby version). Do other buildpacks support the same? Aka node.js, python,
ruby, go, etc.

Thanks in advance!

Jack

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.