How to reconnect to docker instance

I’ll start from the beginning.

  1. I’ve created an Ubuntu machine with docker installed on Azure.
  2. On the top I created two docker containers, I used to connect from an old computer using docker-machine for management tasks.
  3. I’ve changed my computer, so I need to connect from the new one.
  4. I’ve added my azure subscription

However when I try the docker-machine cdmdlet to the existing container I have the following error message:

  • Is there a maximum number of containers running on a Docker host?
  • Why there is no init / initctl on the docker centos image
  • AWS ECS container can't specify a region
  • how to host a java jar with my restlet server on docker cloud
  • How to access several ports of a Docker container inside the same container?
  • Simulation “docker build -f” with ansible module “docker_image”
  • PS C:\WINDOWS\system32> docker-machine ssh vm name
    Host does not exist: "vm name".

    The machine is running but I’ll guess I’ll have to recreate the certificates used for the connection.

    I’ve tried the following with no luck:

    PS C:\WINDOWS\system32> docker-machine regenerate-certs vm name
    Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
    Regenerating TLS certificates
    Host does not exist: "vm name"

    I no longer have access to the old machine.

    Has anyone been into the same situation?
    Any thoughts are welcome.

  • How docker container has extra memory than the host OS?
  • Building and running a docker image for a Go executable
  • Add your application to a Docker image
  • Change Java “SecureRandom” in Dockerfile
  • How do I create a docker machine with a specific URL using docker-machine and VirtualBox?
  • openshift v3 pod file not found
  • One Solution collect form web for “How to reconnect to docker instance”

    You’ll have to recreate the machine using the generic driver:

    docker-machine create \
      --driver generic \
      --generic-ip-address= \
      --generic-ssh-key ~/.ssh/id_rsa \

    Replace the information accordingly.

    Note that this does NOT remove any data on the target instance, rather it just configures docker to talk to machine if it isn’t already, and also generates new certificates so it can communicate with the instance.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.