Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docker-osx-dev
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ function configure_docker_machine {
DOCKER_HOST_NAME="$DOCKER_MACHINE_NAME"
# 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?

# Support both version 0.4.1 (and earlier) and 0.5.0 (and later)
DOCKER_MACHINE_STORE_PATH=$(inspect_docker_machine "{{.StorePath}}" || inspect_docker_machine "{{.HostOptions.AuthOptions.StorePath}}")
DOCKER_MACHINE_DRIVER_NAME=$(inspect_docker_machine "{{.DriverName}}")
Expand Down