Move docker machine certs from one folder to another

docker-machine create -d generic --generic-ip-address i.p.a.d

tar -cf machine_certs.tar -C ~/.docker/machine/certs/ . 
tar -cf machine.tar -C ~/.docker/machine/machines/<machinename>/ .

In machine_certs.tar open config.json and edit /home/user, change to /root e.g. if you will use in root

On another host

mkdir -p ~/.docker/machine/machines/<machinename>
tar xvf machine.tar -C ~/.docker/machine/machines/<machinename>
mkdir -p ~/.docker/machine/certs
tar xvf machine_certs.tar -C ~/.docker/machine/certs

Ivan Borshchov profile picture
Apr 28, 2020
by Ivan Borshchov
Did it help you?
Yes !

Best related