Search code examples
dockerdocker-composedocker-machinedocker-swarm

Move docker-machine to another computer


I have a full working docker-machine/docker-compose cluter working in Google cloud. I control it from my laptop. I want to move Thame ability of control it to another laptop or computer. Which is the way of do it?


Solution

  • If the machine had been setup on Google Cloud using docker-machine then the required files are inside the docker machine home directory:

    • Windows: C:\Users\username.docker\machine\machines
    • Linux/Mac: ~/.docker/machine/machines

    Additionally, You can control the home directory of docker-machine with the environment variable: MACHINE_STORAGE_PATH

    Step 1: Copy those files to the destination computer.

    Step 2: Now adjust all config.json under .docker/machine/machines. There are full path expressions inside each file. Replace the path expressions matching your new location.