Docker support for windows application

Hi All,
I am new to docker, Need basic guideline to move my application to docker.

My application will act as server, will fetch requested data from database and provide it to client.
Is it possible to run it as docker container on windows 2016 server.

Main component:

  1. Bulky application.
  2. Database

This forum is not an official product support or issue reporting channel.

yes, you can use docker on windows 2016 server.

Even older windows versions would be okay, but than the fallback will be boot2docker. A small VM.

First step would be to bring the app into an container. If you should move the database also into a container should be discussed after that. There are pros and cons.

Hi,

Thanks for quick response.

While installing my application I need to do many configuration setting in registery, files and path.
Does following steps are correct?

  1. Install docker engine on windows 2016 server.
  2. Run windows core image as container
  3. Install application into container. Is this correct?
    If not please suggest me correct approach.
    Q. How to setup configuration setting in registery, files and path. Can we have RDP for this or need to do with power shell?

sorry, i’m not an expert on windows. Just could give you general advice.

It’s better to not interact with your host system. So if you could find a way to not access the host windows registry, it would be great. Maybe by using ini files or by passing things within environment variables.

it’s also good practice to automate your build. So instead of starting a container by hand and then install the app within there, try to write a Dockerfile to automate this. Then you also would not need RDP.

On windows you a few options based on what you correctly identified as the basics:

create an entrypoint.ps1 powershell script, copy it to the container in the Dockerfile, and use the CMD or ENTRYPOINT command to execute this on startup

on startup execute a script that simply downloads the powershell script to setup your box, again, getting this established during ENTRYPOINT or CMD commands in the dockerfile

copy the powershell script to the container in the dockerfile and RUN the script in the dockerfile, then all the configuration is baked in. Downside to this is you can’t run it with different configurations, but this is also the easiest

If you want to use windows in a docker container you have to use either Windows Server 2016 or Windows 10 (anniversary edition) on your host machine.
when you build your container you should really script the deployment (where possible) including deploying the app, setting registry keys etc.

Hi Suraj, Did u deploy applications on windows containers? Can u give me more details? Please reach me on +91-9176631768 or can u shoot your contact number to me? Thanks in Advance

Here’s my blog on how I did it: http://philatkinson.net/umbraco-cms-in-docker/