brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

docker-machine support is broken for 0.5.0 #133

Closed lukaso closed 8 years ago

lukaso commented 8 years ago

Fails in 2 ways:

1) Does not detect that docker-machine is already running, and stops loading with Machine "xxx" is already running.

2) Is unable to find the ssh key because the correct inspect command should be:

docker-machine inspect --format="{{.HostOptions.AuthOptions.StorePath}}" "$DOCKER_MACHINE_NAME"

instead of:

docker-machine inspect --format="{{.StorePath}}" "$DOCKER_MACHINE_NAME"

which returns <no value>.

brikis98 commented 8 years ago

Are you interested in submitting a PR for these? :)

lukaso commented 8 years ago

Yes, though I don't know if it's version specific. So I can do a PR to cover the exact failures I'm seeing.

ain commented 8 years ago

@lukaso I just upgraded yesterday, I'll try to reproduce your issue and patch it, because this is very likely to become a blocker for me then. Unless you manage to send PR before me that is :)

lukaso commented 8 years ago

Here is the pull request #134. It is working for me.

dekz commented 8 years ago

Have you noticed keys being moved?

2015-11-06 21:23:24 [INFO] testing if docker machine is running
2015-11-06 21:23:24 [INFO] Installing rsync in the Docker Host image
2015-11-06 21:23:24 [INFO] Performing initial sync of paths: /Users/jacob/work/bili /Users/jacob/work/bili /Users/jacob/work/bili /Users/jacob/work/bili
docker@192.168.99.100's password:
docker@192.168.99.100's password:
docker@192.168.99.100's password:
2015-11-06 21:23:25 [INFO] Warning: Identity file /Users/jacob/.docker/machine/id_rsa not accessible: No such file or directory.
2015-11-06 21:23:25 [INFO] Permission denied, please try again.
2015-11-06 21:23:25 [INFO] Permission denied, please try again.
2015-11-06 21:23:25 [INFO] Permission denied (publickey,password,keyboard-interactive).
2015-11-06 21:23:25 [INFO] rsync: connection unexpectedly closed (0 bytes received so far) [sender]
2015-11-06 21:23:25 [INFO] rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]

Here is my set up, it might be out of date now:

❯❯❯ docker-machine inspect --format="{{.HostOptions.AuthOptions.StorePath}}" dev                                                             master
/Users/jacob/.docker/machine
❯❯❯ find /Users/jacob/.docker/machine/ -name 'id_*'                                                                                        elastic_test
/Users/jacob/.docker/machine//machines/dev/id_rsa
/Users/jacob/.docker/machine//machines/dev/id_rsa.pub

So for my setup I would require:

  DOCKER_HOST_SSH_KEY="$DOCKER_MACHINE_STORE_PATH/machines/$DOCKER_MACHINE_NAME/id_rsa"
lukaso commented 8 years ago

Fixed in #136.