4

I want to run nginx in a Nano Server based Docker container. It works fine if I use Windows Server Core as the base but if I use Windows Nano Server, nginx.exe immediately exits with code -1073741515 (0xC0000135), which the web tells me means "The application failed to intialize properly". No output is printed.

I tried with nginx 1.11.13 and Windows Nano Server 10.0.14393.1066.

At some point, Microsoft published a sample container image that includes Nginx with Nano Server but it does not appear to be maintained and is 7 months out of date, so is not very useful to me. I was also not able to find any instructions for how they generated this container image, so that I could try to reproduce it with up to date components.

What do I need to do in order to make nginx work in a Nano Server based container?

Sander
  • 210
  • 2
  • 6

1 Answers1

5

Problem is that official version of nginx is build with using "any cpu" setting (32 + 64 bit support) but on nano server you can only use native 64 bit only binaries.

You can find native 64 bit version of nginx from here: https://www.nginx.kr and I also uploaded Dockerfile which installs that to nano server to here: https://github.com/olljanat/nginx-nanoserver

olljanat
  • 66
  • 1
  • 1
    I note that this custom 64-bit build of nginx uses an old version of OpenSSL and is fairly old itself. I would be a bit wary of putting such a thing into production use. – Sander May 16 '17 at 07:59
  • 1
    Yes that it true but I'm not sure if even Windows containers at all are production ready yet. Anyway currently only option to get latest version of nginx to nano server is build it yourself. – olljanat May 17 '17 at 12:41
  • https://www.nginx.kr/ is broken – David Gardiner May 01 '20 at 05:11