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

Pack tries to use HTTP proxies running on localhost #1998

Open
benmoss opened this issue Dec 6, 2023 · 4 comments
Open

Pack tries to use HTTP proxies running on localhost #1998

benmoss opened this issue Dec 6, 2023 · 4 comments
Labels
status/discussion-needed Issue or PR that requires in-depth discussion. type/bug Issue that reports an unexpected behaviour.

Comments

@benmoss
Copy link

benmoss commented Dec 6, 2023

Summary

I run https://github.com/williambailey/pacproxy locally to automatically proxy requests to the right proxy server (confusing, I know).

When I run pack build it tries to use 127.0.0.1 as a proxy from inside the container, since that's what I have set as the http_proxy environment variable.

This doesn't work since the container is running on a virtual network.


Reproduction

Steps
  1. Run a proxy on localhost
  2. Use pack build
Current behavior
[builder] failed to fetch dependency: failed to make request: Get "https://artifactory.corp.com/artifactory/golang-release/go1.21.3.linux-amd64.tar.gz": proxyconnect tcp: dial tcp 127.0.0.1:8888: connect: connection refused
Expected behavior

It should just work!


Environment

pack info
docker info
@benmoss benmoss added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Dec 6, 2023
@benmoss
Copy link
Author

benmoss commented Dec 6, 2023

benmoss/pack@main...no-localhost-proxying fixes the problem for me, but not sure it's how it should really be fixed

@jjbustamante
Copy link
Member

Hi @benmoss

What happen if you don't set any PROXY environment variable?

@benmoss
Copy link
Author

benmoss commented Feb 5, 2024

@jjbustamante then I can't access other machines on my VPN. I rely on the PROXY env variables to tell tools to connect over a proxy, but for Docker those settings are configured at the VM level.

Screenshot 2024-02-05 at 2 24 38 PM

@benmoss
Copy link
Author

benmoss commented Feb 5, 2024

Maybe there isn't a universal solution to this, what works for me may break someone else's workflow.

@jjbustamante jjbustamante added status/discussion-needed Issue or PR that requires in-depth discussion. and removed status/triage Issue or PR that requires contributor attention. labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/discussion-needed Issue or PR that requires in-depth discussion. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

No branches or pull requests

2 participants