Docker Community Forums

Share and learn in the Docker community.

Docker-Machine with windows VM on AWS

So I am trying to create an AWS gitlab-runner that would auto-scale with AWS instances with the amazonec2 driver and docker-machine.
It seems that Gitlab-runner is using docker-machine as its way of creating vm and wants to send the job to them after.
I’d like the VM docker host to run windows containers so the VM I spawn with docker-machine has a windows AMI.

The instance gets started correctly on AWS but it gets stuck on the message:
Waiting for ssh to become available…

So I am wondering if all of this is possible at all. Docker-machine doesn’t seem to ssh into the windows container and even, ssh-ing into a windows container looks like weird to me. I am not sure I should try to do this at all and are not finding a lot of results on docker-machine windows vms.

Is it possible to create a docker-machine windows vm? And how docker-machine connects to it?


I’m very interested in exactly the same thing. I’m currently using amazonec2 driver successfully for linux machines, would love the same to work for windows as well.

I haven’t tried it yet but this may be another option:

@jpnolin @alelec Did either of you get anywhere with this?

Due to restrictions on the number of links in a post for new users like me, I’ve put the meat of my comment on Gist. In brief:

  • Amazon Windows AMIs do not come with SSH
  • It is possible to create your own Windows AMI with SSH
  • Docker Machine will connect to a Windows machine over SSH, but does not know how to “provision” it once it connects

Are there any updates on this?

I got as far as @thejohnfreeman but once docker-machine is able to connect to the host, it fails trying to provision it:

Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Error creating machine: Error detecting OS: Error getting SSH command: ssh command error:
command : cat /etc/os-release
err     : exit status 1
output  : 'cat' is not recognized as an internal or external command,
operable program or batch file.