-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: master
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I just had a look at http://nginx.org/en/docs/windows.html
|
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. |
Opening this for discussion.
cc @tianon @StefanScherer