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

Commit c4df976

Browse files
committed
Merge pull request #145 from dekz/master
Added explicit machines id_rsa. #140
2 parents 50b4c5d + e2cd4ca commit c4df976

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/docker-osx-dev

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,14 @@ function configure_docker_machine {
410410
DOCKER_MACHINE_DRIVER_NAME=$(inspect_docker_machine "{{.DriverName}}")
411411

412412
DOCKER_HOST_SSH_URL="$DOCKER_HOST_USER@$DOCKER_HOST_IP"
413-
DOCKER_HOST_SSH_KEY="$DOCKER_MACHINE_STORE_PATH/id_rsa"
413+
# 0.5.0 returns StorePath as a root directory /machine
414+
DOCKER_HOST_SSH_KEY="$DOCKER_MACHINE_STORE_PATH/machines/$DOCKER_MACHINE_NAME/id_rsa"
415+
416+
if [[ ! -f $DOCKER_HOST_SSH_KEY ]]; then
417+
# 0.4.1 returns StorePath as /machines/dev
418+
DOCKER_HOST_SSH_KEY="$DOCKER_MACHINE_STORE_PATH/id_rsa"
419+
fi
420+
414421
if [[ $CURRENT_LOG_LEVEL == "DEBUG" ]]; then
415422
DOCKER_HOST_SSH_COMMAND="docker-machine -D ssh $DOCKER_MACHINE_NAME"
416423
else

0 commit comments

Comments
 (0)