microsoft / Windows-Containers

Welcome to our Windows Containers GitHub community! Ask questions, report bugs, and suggest features -- let's work together.
MIT License
408 stars 63 forks source link

Add 32-bit x86 Support for Nanoserver #118

Closed grochoge closed 1 year ago

grochoge commented 3 years ago

I'd like to be able to run 32-bit Windows applications in a container.

Right now there's a 20x size gap between nanoserver (which can only run 64-bit applications) and servercore (which supports WOW64).

It would be useful to have a 32-bit x86 only version of nanoserver (if that's possible to run on a 64-bit kernel) or a version of nanoserver that has WOW64 support added.

ghost commented 3 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, please provide an update or close this issue.

weijuans-msft commented 3 years ago

@grochoge we haven't seen many people asking this. To help us prioritize, can you share more details on the use cases?

grochoge commented 3 years ago

@weijuans-msft the use case is running some legacy 32-bit applications (in this case built with mingw32) in a container with smaller on-disk size than Server Core. Really it would be nice to have some sort of intermediate between Nanoserver and Server Core. Maybe a way to install only needed features (ala Enable-WindowsOptionalFeature) on top of Nanoserver. Not sure if that's been suggested already?

ghost commented 3 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, please provide an update or close this issue.

slonopotamus commented 3 years ago

Maybe a way to install only needed features (ala Enable-WindowsOptionalFeature) on top of Nanoserver.

That would be ideal, if users could tune image contents themselves from nano to full-blown desktop image by installing optional parts.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, @judyliu-ms, please provide an update or close this issue.

judyliu-ms commented 2 years ago

Hi @grochoge, we are currently investigating this issue. For internal reference, the ADO tracking number is 37314246.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, @judyliu-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, @judyliu-ms, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @weijuans-msft, @judyliu-ms, please provide an update or close this issue.

AdaskoTheBeAsT commented 2 years ago

hi - any news about x86 version of nano?

fschmied commented 2 years ago

Joining in - we, too, have the scenario mentioned above. We need to run legacy processes (in this case, a SIP for Authenticode Signing that Microsoft provides in an x86 version only) in containers and would like to use the much smaller nanoserver images (or something built on them that includes WOW64).

Zantier commented 2 years ago

I would like this too, in order to run nginx, which is only released for Windows in 32-bit.

weijuans-msft commented 2 years ago

Thanks. What other 32-bit apps that folks wanted to run on Nano Server container?

AdaskoTheBeAsT commented 2 years ago

Hi, by general in some industries like HVAC it is very common that component manufacturers for water heaters, coolers, fans etc provide their calculation libraries in form of dll's. Usually those companies do not have strong it departments (pun intended ;)) and they provide dlls targeted only for x86. In my professional life I saw plain dll's and also COM libraries written in VB, C++, Delphi even PowerBasic. It is very beneficial to have some interop layer written in .NET 6 on top of them and make windows container connect through some message bus (as some of them are able to calculate only one calculation in parallel) and multiply those containers with some load balancing. But right now only available solution is windows core container which is ~5GB in size - too large for simple worker container ;)

weijuans-msft commented 2 years ago

@AdaskoTheBeAsT Interesting! How and where do you run those Windows containers? What is the scale/size? Do you use any orchestrator like K8s?

AdaskoTheBeAsT commented 2 years ago

@weijuans-msft many years ago I made such systems where such dll's were "hidden" by web apis hosted on IIS on same server - when I got back to such architecture after years I saw potential for improvements to modernize that architecture - nowadays natural direction is to do slim containers which can be instantiated on demand etc - I am not expert in kubernetes (but planning to extend my knowledge) - I thought that not only in HVAC but also other less rich industries it can be common problem - legacy systems etc which can be hidden by small facade located on slim windows container

SamCotroneo-Wymac commented 2 years ago

Being able to run run the official nginx for windows inside a nano container would be amazing.

romandolinsky commented 2 years ago

@SamCotroneo-Wymac There is windows 64bit instance of nginx in official nginx page. But Like was mention: nanoserver with x86 support will make our life easier.

Zantier commented 2 years ago

@romandolinsky I don't want to derail this issue too much, but what makes you say that there's a 64-bit Windows build of nginx on the official site?

If I go to the downloads page, and download "nginx/Windows-1.23.1", the only exe in the zip file is "nginx.exe", which you can see is 32-bit with a hex-editor (or otherwise).

romandolinsky commented 2 years ago

Sorry for my mistake but source which I use in past was not official.

Sudoite commented 2 years ago

I have a use case for x86 on Nanoserver: hosting a vulnerable x86 Windows binary in a Docker container with a small footprint for CTF competitions. The smaller footprint in theory makes learning Windows security accessible to a broader audience than if we were to require participants to have more storage readily available. I was able to get my binary working by using Process Monitor to figure out what DLLs were missing and then copy them into the appropriate locations in Nanoserver during the Docker build process. But that's a messy, host-specific workaround. Definitely would like to see this feature!

RealFrogo commented 2 years ago

In my company we have a lot of legacy code which relies on windows based 32bit software to be built and maintained, which cannot be easily changed, not least due to very strict admission requirements. As we are currently trying to upgrade our build servers, we want to switch to using containers as well, but want them to be as small as possible, as huge containers slow down the build processes. And to be honest, the gap in size between server core and nano server is ridiculous (if I may say so), if there are no intermediate stages available. A customizable version of the nanoserver (including 32bit support) would therefore be highly appreciated, just as it is possible with all those linux images out there. It would be great if you could make this possible, one way or the other!

ghost commented 1 year ago

This issue has been open for 90 days with no updates. @weijuans-msft, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 90 days with no updates. @weijuans-msft, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 90 days with no updates. @weijuans-msft, please provide an update or close this issue.

smkanadl commented 1 year ago

Still interested in this!

RealFrogo commented 1 year ago

So am I!

akrus commented 1 year ago

We're also interested in this.

akarshm commented 1 year ago

This is in our backlog and will be considered a feature item for the next major release for Windows Server Containers. Unfortunately, I don't have a timeline to share at this time.

Jens-G commented 1 year ago

Slightly offtopic: It might be worth reconsidering the fact, that today we still have to use 32-bit installers to install runtimes on 64 bit platforms. Having e.g. a 64 bit installer for vcredist could save a lot of time for many people trying to install the runtime in a nano-based container and only getting exit code 3221225781 as a result.

malaterre commented 9 months ago

Thanks. What other 32-bit apps that folks wanted to run on Nano Server container?

I'd like to be able to run vswhere.exe from the vs_buildtools. See:

smkanadl commented 9 months ago

Thanks. What other 32-bit apps that folks wanted to run on Nano Server container?

I have some .NET code that specifically uses x86 native code. Being able to test and deploy this on the much smaller nano image would be very helpful!

RealFrogo commented 9 months ago

Thanks. What other 32-bit apps that folks wanted to run on Nano Server container?

In our case it's old compilers we need to use, MinGW with gcc 4.8 and CodeSourcery with gcc for ARM 4.5. We have to guarantee to be able to rebuild our software with the same compiler and are not allowed to change them.

mohsh86 commented 1 month ago

How come the issue is closed by providing a 64-bit exe version of a 32-bit one, when the issue clearly says add x86 support to nano image?

A legacy piece of software few MB in size doesn't need the 5 GB+ servercore image!