Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP_PROXY support #2

Open
rarkins opened this issue Mar 22, 2021 · 3 comments
Open

HTTP_PROXY support #2

rarkins opened this issue Mar 22, 2021 · 3 comments

Comments

@rarkins
Copy link
Member

rarkins commented Mar 22, 2021

We want all tools to be able to support HTTP_PROXY, including with a wrapper if necessary. We also want to support that a buildpack-based Dockerfile can be built behind a HTTP_PROXY.

@rarkins
Copy link
Member Author

rarkins commented Mar 26, 2021

To properly test proxy, we need a container running without any direct internet access.

This seems relevant: https://forums.docker.com/t/internal-network-between-containers-without-external-network-access/41751/9

Found via https://stackoverflow.com/questions/39913757/restrict-internet-access-docker-container

In theory there could be different proxies during build and during deployment so need to think how that would work. Our ideal is that it simply needs HTTP_PROXY passed in, e.g.

Build: docker build --build-arg HTTP_PROXY=http://10.0.0.1 . -t my_image

Run: docker up -d -e HTTP_PROXY=https://proxy.company.com my_image

We can address it this way:

  • For tools (build or runtime) which respect HTTP_PROXY then we do nothing additional
  • For tools which can use a proxy but need it provided a different way (e.g. config file, or CLI arg) then we perhaps need to wrap their CLI command to prepare the proxy config before calling the actual command
  • For tools which don't support proxy, we need to find alternatives or document that it's impossible. Ideally zero of those in build.

@rarkins
Copy link
Member Author

rarkins commented Mar 26, 2021

We probably need to think about DNS too. Maybe the proxy container will also be the DNS forwarder.

@viceice
Copy link
Member

viceice commented Aug 18, 2022

at least apt needs a special handling on install, which we support via APT_HTTP_PROXY env. thats already tested well. also ci tests are using the apt proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants