13

I tried docker-machine create -d none --url tcp://<ipaddr>:2376 remote and copied {ca,key,cert}.pem (Client certs) to the machine directory. Then I did eval "$(docker-machine env remote)" which caused this error:

open /Users/uetchy/.docker/machine/machines/remote/server.pem: no such file or directory

I'm confusing why they need the server.pem even if client keys already exist.

How can I avoid to put a critical server.pem onto a local machine?

1
  • 1
    Any updates on this? have you found a solution?
    – oleynikd
    Mar 23, 2016 at 22:36

1 Answer 1

3

You must use the "generic" docker-machine driver: https://docs.docker.com/machine/drivers/generic/

4
  • 6
    generic driver seems to work with SSH for provisioning. Is there no option to import already provisioned servers?
    – uetchy
    Sep 6, 2015 at 8:56
  • 4
    The generic driver isn't the same as the none driver, as it attempts to actually install docker-engine, updates packages,messes with the hostname, and other things you don't want when you already have the server running. If generic had a --dont-install option, then it would be perfect for this use case.
    – metasim
    Nov 12, 2015 at 12:02
  • 2
    Also came across that question - it has been discussed on Github, see github.com/docker/machine/issues/3212
    – pklndnst
    Aug 21, 2017 at 9:43
  • 1
    Please add a big WARNING that following the instructions to add a docker machine from the link you provided, will delete all docker containers on the host machine! There is no mention in the docker docs about this behavior. I just deleted all production containers on one of our servers...
    – Shumoapp
    Sep 29, 2020 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.