# Managing docker machines and swarms

- Link: https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/
- Published: 2016-05-04T10:22:29-07:00
- Author: rich

So some quick notes on cool ideas:

 1. Docker-machine is only designed to work on a single client. So if you want multiple
    users or you have a home and work machine it is actually very hard to get the configuration
    right. There is a magic configuration json that does this but it uses hard coded
    paths. And you need the right TLS secrets to connect. It’s current an open issue
    [#2516](https://github.com/docker/machine/issues/2516) but in the mean time there
    is a nice script that does the[ docker-machine import and export](https://gist.github.com/schickling/2c48da462a7def0a577e).
    What it actually does is very simple, it just wipes out the various config.jsons
    in `~/.docker/machines/*/config.json` and gets rid of the specific install data.
 2. You also have to copy over the certifications which are `$MACHINE_STORAGE_PATH/
    certs` and these are sensitive, so you need a Private store for these as they are
    secrets for encrypting docker communications. As an aside, the normal place for
    these secrets is `$HOME/.docker/machines/certs/*`. For the truly paranoid, you 
    should use an encrypted file store and then symbolic link into it so that not everyone
    with sudo access can see these keys.
 3. Finally if you are lucky and you have exactly the same configuration (eg you have
    just Macs or you have just Linux), it looks ilke you can actually just copy that
    whole directory and it works.

### Share this:

 * [  Mastodon ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=mastodon)
 * [  LinkedIn ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=linkedin)
 * [  Facebook ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=facebook)
 * [  WhatsApp ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=jetpack-whatsapp)
 * [  Email ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?subject=%5BShared%20Post%5D%20Managing%20docker%20machines%20and%20swarms&body=https%3A%2F%2Ftongfamily.com%2F2016%2F05%2F04%2Fmanaging-docker-machines-and-swarms%2F&share=email)
 * [More](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/#)

 * [  Telegram ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=telegram)
 * [  Print ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/#print?share=print)
 * [  Pinterest ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=pinterest)
 * [  Tumblr ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=tumblr)
 * [  X ](https://tongfamily.com/2016/05/04/managing-docker-machines-and-swarms/?share=twitter)

### Like this:

Like Loading…
