Skip to content

Instantly share code, notes, and snippets.

@pratos
Created July 20, 2017 07:58
Show Gist options
  • Save pratos/0bd26e1d46526045de44fb03a39f705c to your computer and use it in GitHub Desktop.
Save pratos/0bd26e1d46526045de44fb03a39f705c to your computer and use it in GitHub Desktop.
Move docker machines around

Moving docker machines around in different systems

There might be a case when you need to work at home or any remote place away from your own office. You have all the docker-machines created and want to get them to your laptop/home system.

Follow the steps below:

  • Copy all the machines from .docker/machine/machines to your .docker/machine/machines
  • Change the config.json in each machine: eg .docker/machine/machines/docker1m/config.json
    • All the paths from /Users/office/.docker/... to /Users/home/.docker/...
    • Save them and run docker-machine ls to confirm.
    • If you get this error: Unable to query docker version: Unable to read TLS config: open /home/pratos/.docker/machine/certs/ca.pem: no such file or directory, you still haven't done the above.
    • If you don't get the above error, the operation is successful & now you can sync your code with your docker-machines easily.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment