JonasProgrammer / docker-machine-driver-hetzner

Docker machine driver for the new hetzner cloud API
https://jonasprogrammer.github.io/docker-machine-driver-hetzner/
MIT License
431 stars 53 forks source link

Driver "hetzner" not found. Do you have the plugin binary "docker-machine-driver-hetzner" accessible in your PATH? #91

Closed finicu212 closed 1 year ago

finicu212 commented 1 year ago

Hi! I'm having this weird issue:

$ docker-machine --debug create --driver=hetzner
Docker Machine Version:  0.16.2, build bd45ab1
Driver "hetzner" not found. Do you have the plugin binary "docker-machine-driver-hetzner" accessible in your PATH?

My driver is in /usr/local/bin, with execute perms

$ ls -l /usr/local/bin/docker-machine-driver-hetzner 
-rwxr-xr-x 1 root root 9789440 nov 19 12:30 /usr/local/bin/docker-machine-driver-hetzner

/usr/local/bin is in my PATH.

I'm out of ideas, is there something wrong with my docker-machine-version? i installed it via snap install docker. doing snap list:

docker 20.10.17 2285 latest/stable canonical✓ -

JonasProgrammer commented 1 year ago

Can you execute docker-machine-driver-hetzner from the command line? The binary itself just quits with an error message, but that way you can at least verify your settings.

If it doesn't, can you run file /usr/local/bin/docker-machine-driver-hetzner and check it matches your architecture?

finicu212 commented 1 year ago

hi, running from command-line does indeed throw the error (from anywhere in the file system)

$ which docker-machine-driver-hetzner
/usr/local/bin/docker-machine-driver-hetzner
$ docker-machine-driver-hetzner
This is a Docker Machine plugin binary.
Plugin binaries are not intended to be invoked directly.
Please use this plugin through the main 'docker-machine' binary.
(API version: 1)
JonasProgrammer commented 1 year ago

Hi and thank you for trying out, I just wanted to get the cause of a misdownloaded binary out of the way (you do start asking for the third time an issue is created due to that...).

Now that I think more about it, you mentioned snap: This may be the cause of the problem. I have never looked deeper into it, but from what I remember it basically locks every application into a restricted container with a very limited view of the system. And from that, my guess is that despite being in $PATH, docker-machine may not actually see the driver binary.

Just for cross-checking: Could you please grab a raw machine binary and try running that using an absolute callpath with the very same arguments? If that works, snap is likely the culprit.

finicu212 commented 1 year ago

ahhh, yes. that seems to have fixed it. Sorry for the "tech support" kind of issue, and thank you so much for teaching me something new about snap!