-
Notifications
You must be signed in to change notification settings - Fork 20
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
chore: inheriting proxy env vars from host when building with docker #2192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great that you proactively submit PRs to tackle the problem you met 👍
Have you tried this?
https://docs.docker.com/network/proxy/
Like using a customised docker config for it - as it doesn't apply to everyone, maybe it's a good idea to keep the change local too
It also seems that even without definition inside Dockerfile, the env HTTP_RPOXY can be recognised:
|
I performed a test removing the definitions inside Dockerfile, within the server under GFW. |
This is utterly strange. Whether it can actually access host proxy is another story. |
I tried and found that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
In my test |
Modified the build script to pass
HTTP_PROXY
environment variables from the host machine to the build container, so that developers under GFW would use their custom proxy to build the project.