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

Docker restarts every time I start or stop Charles proxy #2039

Closed
shichimitogarashi opened this issue Sep 7, 2017 · 9 comments
Closed

Docker restarts every time I start or stop Charles proxy #2039

shichimitogarashi opened this issue Sep 7, 2017 · 9 comments

Comments

@shichimitogarashi
Copy link

Expected behavior

Docker continues as normal when starting or stopping Charles proxy (https://www.charlesproxy.com/)

Actual behavior

Docker restarts whenever I start or stop the proxy. This is new behavior with 17.06.2-ce-mac27 (19124); previous versions had no problems with this.

(there also appear to be networking problems in containers when running Charles proxy, but if I can get enough information about this, I'll file a separate issue. This is also new)

Information

Docker for Mac: version: 17.06.2-ce-mac27 (4cdec4294a50b2233146b09469b49937dabdebdd)
macOS: version 10.12.6 (build: 16G29)
logs: /tmp/317ED9B7-865A-4358-8FFE-A98515BA7AF9/20170907-163011.tar.gz
[OK] db.git
[OK] vmnetd
[OK] dns
[OK] driver.amd64-linux
[OK] virtualization VT-X
[OK] app
[OK] moby
[OK] system
[OK] moby-syslog
[OK] db
[OK] env
[OK] virtualization kern.hv_support
[OK] slirp
[OK] osxfs
[OK] moby-console
[OK] logs
[OK] docker-cli
[OK] menubar
[OK] disk

Steps to reproduce the behavior

  1. Start or stop Charles proxy

I haven't tried using other local proxies to see if this repros with those as well.

@djs55
Copy link
Contributor

djs55 commented Sep 8, 2017

Thanks for your report.

I suspect when the proxy turns on and off, it modifies the system proxy settings in some way. By default if the proxy settings change then Docker will restart because it needs to reset the http_proxy environment variables in the VM.

There is a new "transparent proxy" in 17.07 and later (i.e. in the "edge" channel). If you install edge then you can switch the proxy on with the following commands:

cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
mkdir -p com.docker.driver.amd64-linux/slirp
echo -n true > com.docker.driver.amd64-linux/slirp/enable-http-intercept
git add com.docker.driver.amd64-linux/slirp/enable-http-intercept
git commit -s -m 'Enable HTTP interception

In this mode there is no rewriting of environment variables and therefore no need to reboot the VM. Hopefully it will become default in a later version.

@marconett
Copy link

It would be nice if there was an option in the menu to just "Don't use a proxy".

screen shot 2017-10-11 at 23 25 41

@raxityo
Copy link

raxityo commented Oct 11, 2017

@marconett The edge version of Docker For Mac has that option:
image

It seems like setting Manual Proxy configuration and leaving all fields empty also disables proxy.

@marconett
Copy link

marconett commented Oct 11, 2017

oh. weird, it says "Docker 17.09.0-ce-mac34 is currently the newest version available." and it says "This is an edge version." in the preference menu.

thanks for the input!

@iineva
Copy link

iineva commented Oct 30, 2017

Same problem when i change Surge's config.
I'm config proxies to Manual proxy configuration to solve it.
You don't need to setup any proxy setting in below field.

@liambowers
Copy link

I can confirm that on OSX, using the manual proxy configuration and leaving the fields blank solves the issue. I can toggle the Charles proxy setting on and off without issue now.

@shichimitogarashi
Copy link
Author

Looks good to me as well. Thanks.

@YRM64
Copy link

YRM64 commented May 6, 2018

I concur with the remarks made by Djs on September 8, 2017 with the additional following remarks: You might want to consider the option of using the edge version of Docker for Mac in configuring proxies to pull images, and to manually have more control over those settings.

@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

9 participants