-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Allow Docker for Mac beta to work by using port forwarding #9809
Conversation
@bparees ptal |
glog.V(4).Infof("Killing previous socat tunnel") | ||
err = openshift.KillExistingSocat() | ||
if err != nil { | ||
glog.V(1).Infof("error: cannot kill socat: %v", err) |
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.
should we abort at this point instead of continuing/eating the error?
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.
nm, this is shutdown so we wouldn't want to abort.
5a3fd86
to
53e3fa7
Compare
Added logging of the error if socat can't be killed. It sholuldn't be fatal though since the process could have been killed some other way. |
53e3fa7
to
1660986
Compare
Now |
The latest Docker for Windows is still not working with this branch (actually compile is broken)... working on a fix. |
1660986
to
2d58450
Compare
Updated to allow windows to work |
@bparees do you have any additional comments on this? |
@csrwng nope, sorry, lgtm. |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6459/) (Image: devenv-rhel7_4623) |
Evaluated for origin merge up to 2d58450 |
Docker for Mac no longer allows direct access via TCP/IP to the VM that's running Docker.
Containers communicate with the outside world with forwarded ports that are opened on the host machine via unix pipes.
Port forwarding will not work on a container that uses the host's network stack (--net=host) which is what OpenShift uses.
This pull introduces a solution by using socat on the Mac to forward requests to 8443 to the origin container via 'docker exec'.
The option can be directly enabled by using the --forward-ports flag or will be used automatically when running on the Mac platform and no viable direct IP is found to the docker vm.
Fixes #9487