Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile for building windows image #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

friism
Copy link

@friism friism commented Mar 16, 2017

Opening this for discussion.

cc @tianon @StefanScherer

EXPOSE 80 443
WORKDIR "C:\Program Files\nginx"
CMD Start-Process -NoNewWindow -FilePath nginx.exe ; \
Add-Content logs\access.log 'nginx started...' ; Get-Content -Wait logs\access.log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically tail -f -- can't we run nginx the same way in Windows that we do in Linux to get it to stay in the foreground and log to stdout/stderr?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tianon I googled hard, but I don't think there's an elegant way to symlink the logfiles to stdout/err devices on Windows (they just don't exist).

I agree that this solution is super lame. The only reason it would be acceptable is because nginx on Windows is experimental in the first place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

@@ -0,0 +1,16 @@
FROM microsoft/windowsservercore

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we run nginx.exe in nanoserver?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StefanScherer It doesn't work currently, I tried. I'm guessing it uses 32bit APIs and relies on WoW. Someone should try to compile with 64-bit only toolchain for nanoserver.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, would be great for future versions of nginx.

@StefanScherer
Copy link

I just had a look at http://nginx.org/en/docs/windows.html

To install nginx/Windows, download the latest mainline version distribution (1.11.10), since the mainline branch of nginx contains all known fixes.

@thresheek
Copy link
Collaborator

thresheek commented Mar 17, 2017

Given that the facts outlined in http://nginx.org/en/docs/windows.html#known_issues still stand, I don't really get the idea of publishing it on docker.

And yes, mainline version should be used, not the stable one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants