docker-machine connect to existing machine

I have a docker swarm all hosted on AWS, created basically along the lines of this tutorial.

To deploy our code, I need to be able to access this swarm separate of the computer where I created these instances. I don’t see anywhere in the docs for the docker-machine amazonec2 driver where I can use my AWS credentials to connect to these existing instances.

  • How to mount file from host to docker container on ECS
  • Docker instruction in Java Maven project to skip tests
  • Is it possible to create a docker container that contains one or more containers? [closed]
  • MobileFirst Container CLI Extensions are not installed
  • PHP echo statement with URL parameter
  • Wait for job/pod completion in Kubernetes or Google Container Engine
  • Some tutorials I came across use a --url argument to specify via the docker-machine url to connect to an existing instance, but I don’t see that argument in my most recent docker-machine version.

    Other tutorials mention TLS configuration and using that in conjunction with docker-machine to connect to existing instances, but given unique/secret AWS credentials, this seems redundant and adds a layer of complexity I hope I can avoid.

    What is the recommended approach to this?

  • Docker mount namespace to share between containers
  • web server running inside a docker container running inside an EC2 instance responses very slowly
  • Can I use docker to run MSBuild on OSX?
  • Unexpected error when Vagrant up using yaml file
  • Exclude starting some containers with Docker Compose
  • AWS BeanStalk environment running multi-container Docker fail to start with Health: Severe
  • One Solution collect form web for “docker-machine connect to existing machine”

    To get access to an existing instance, you can use the docker-machine create --driver generic command. The command will ssh onto the machine, make sure docker is installed, and then download certificates that it stores for future access e.g. using docker-compose.


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


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