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

Using a proxy while building images #1380

Closed
SebastianPfliegel opened this issue Dec 4, 2017 · 10 comments
Closed

Using a proxy while building images #1380

SebastianPfliegel opened this issue Dec 4, 2017 · 10 comments

Comments

@SebastianPfliegel
Copy link

SebastianPfliegel commented Dec 4, 2017

Expected behavior

I need to use a proxy and I'm able to set it in the proxies tab in the Docker Settings. I expect Docker to use the set proxy for all kind of transactions: pulling/pushing images, in the final container and while building the actual image.

Actual behavior

Unfortunately this only applies to pulling/pushing images and the container. While building no proxy is set and therefore functions like apt-get and curl fail.

Information

  • Diagnostic ID: 80162FE0-1E80-4CAD-9437-195610F0B460/2017-12-04_15-43-59
  • Windows 10 Enterprise

Steps to reproduce the behavior

  1. set a proxy in the settings GUI and apply
  2. build a Dockerfile using RUN apt-get update
  3. build fails due to connection refused

Workaround

As a workaround I'm able to set the build args myself. Here's a sample compose-file:

version: '2'
services:
  my_service:
    image: myservice:latest
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - http_proxy=http://myproxy.com:8080
        - https_proxy=http://myproxy.com:8080
        - HTTP_PROXY=http://myproxy.com:8080
        - HTTPS_PROXY=http://myproxy.com:8080
@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@SebastianPfliegel
Copy link
Author

/remove-lifecycle stale

@Darmuck
Copy link

Darmuck commented Jun 3, 2018

I met same issue.
The workaround is work fine. Thanks! @SebastianPfliegel

Additionally, in my case, I found another solution.
I set proxy settings to ~/.docker/config.json . This issue was solved.
ref. https://docs.docker.com/network/proxy/

Environment

  • OS: Windows 10 Pro
  • Docker: Version 18.03.1-ce-win65 (17513)
  • Docker Compose: v1.21.1

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@SebastianPfliegel
Copy link
Author

/remove-lifecycle stale

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@Pvlerick
Copy link

/remove-lifecycle stale

So, apparently no-one cares :-)

@SebastianPfliegel
Copy link
Author

I guess so

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants