Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Conversation

@rkuzsma
Copy link

@rkuzsma rkuzsma commented Apr 11, 2016

Fix for "Connection refused" running docker-osx-dev with docker-machine
#183

Fix for "Connection refused" running docker-osx-dev with docker-machine
#183
# Support < 0.4.1 and >= 0.5.1
DOCKER_HOST_USER=$(inspect_docker_machine "{{.Driver.SSHUser}}" || inspect_docker_machine "{{.Driver.Driver.SSHUser}}")
DOCKER_HOST_IP=$(inspect_docker_machine "{{.Driver.IPAddress}}" || inspect_docker_machine "{{.Driver.Driver.IPAddress}}")
DOCKER_HOST_IP=$(docker-machine ip)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ip command takes the machine name as an arg. Shouldn't you use $DOCKER_MACHINE_NAME as a parameter here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fallbacks to "default" if none is give: https://github.com/docker/machine/blob/5b9663f8960af73c048e14cc60566ae487c07728/commands/commands.go#L102 but to me it seems that it would be best to supply the $DOCKER_MACHINE_NAME in here so this would work for people using a different machine name :) So $(docker-machine ip "$DOCKER_MACHINE")

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rkuzsma Are you still working on this?

@brikis98
Copy link
Owner

Thanks for the PR. Just one comment. If you make a change, make sure to post a comment, as GitHub doesn't send notifications for new code pushes to a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants