Managing docker machines and swarms

0

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┬ábut in the mean time there is a nice script that does the docker-machine import and export. 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.

Related Posts

© All Right Reserved