How do I deploy to a remote docker host on windows server 2016?

1k views Asked by At

So I have 2016 vm set up on azure and I'd like deploy a container to it. Most articles I've read recommend using docker compose and machine to set this up, but I can't find any examples on how to do it for server 2016. I realize it's brand new.

My first pass was to attempt to add it as an existing host to docker machine, but I can't figure that out. I found an example, but it only goes through docker machine actually creating a new host on azure, which isn't gonna work when I need to setup another workstation to do work with it. Looking at the windows docker cli docs, I don't see any flags to set the remote host.

So, given a server 2016 server running the docker engine (windows containers), how do I build my application into an image locally and deploy it to the remote server?

Has anyone figure this out yet?

1

There are 1 answers

3
Falco Alexander On

the common way to develop and deploy an application with docker would be to build the container image on your dev machine, push the image to your docker repository (either docker hub or a private registry) and then docker run the image on your server, which will implicitly pull that image from your hub. To run the docker commands on your server, you can either remote through powershell or setup your docker service to listen remotely. Within an azure subnet this could be done unsecured, but you will very probably make it save by protecting a Windows 2016 Docker engine with TLS