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:

  • LXC/docker.io & kernel updates
  • Storing in an ENV the outcome of a git command
  • Rethinkdb race conditions creating table
  • Deploying docker swarm without using docker machine
  • Content-shell didn't run in docker
  • Tensorflow serving with Docker while the client is a Windows 7 machine
  • 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.

  • Docker Swarm CD/CI (Jenkins, Docker)
  • Moving app to docker from host increases HTTP lag by 5 seconds
  • Jenkins Pipeline push Docker image
  • Running a Docker image command in a mounted folder
  • Docker is stuck on “download complete” for pull
  • Clashing between two postgres database though having two different docker-compose yaml files for django projects
  • 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=203.0.113.81 \
      --generic-ssh-key ~/.ssh/id_rsa \
      vm
    

    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.