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

Support MSVC redistributables downloading inside nanoserver containers #112

Closed
awakecoding opened this issue May 10, 2021 · 1 comment
Closed
Assignees
Labels
App Compatibility Cross-platform compatibility assurance

Comments

@awakecoding
Copy link

Request: find a way to download the MSVC redistributable files inside a nanoserver container image, without relying on local filesystem copying (possible with a full MSVC installation on the host, but it's just a pain to require that) or without a multi-stage build using a servercore container just to download and install vc_redist.x64.exe and then copy only the required DLLs inside the nanoserver container.

I know that historically the MSVC redistributables have only been publicly redistributed as an MSI installer wrapped inside an executable, and that the DLL files it contains have only been available as part of a full MSVC installation. However, since nanoserver containers do not support MSI installations, the only way to "install" anything is to either use the MSI installer in a servercore container and then copy the files over, or you can just download the no-installation zip file for what you need.

In my case, I just managed to build a MongoDB nanoserver container image using the MongoDB zip file, but I ran into issues trying to install the required MSVC runtime. In the case of containers, the concept of "installation" really gets blurred, because most of the time all you really need is to copy files in the correct location, modify environment variables, and sometimes tweak a few registry keys if you are unlucky.

The MongoDB installation from the zip file was relatively straightforward, but what took me hours was finding a way to get vcruntime140.dll and MSVCP140.dll inside the nanoserver container. I eventually gave up and used the multi-stage build to see if it works, and it does. I should clarify that I'm using the powershell nanoserver base image, because PowerShell has everything needed to download and install stuff relatively easily. It wouldn't be much work to trim and remove PowerShell from the final image in case it's not needed at runtime.

Would it be possible to request an "vc_redist.x64.zip" file from the MSVC team, as a way to reduce friction when building nanoserver containers? This is literally the last servercore container image I need to switch all of my containers to nanoserver and stop dealing with gigantic base images in the future. Thanks!

@ghost ghost added the triage New and needs attention label May 10, 2021
@vrapolinario vrapolinario self-assigned this May 12, 2021
@vrapolinario vrapolinario added App Compatibility Cross-platform compatibility assurance In progress and removed triage New and needs attention labels May 12, 2021
@vrapolinario
Copy link
Contributor

Thanks for the detailed information on the issue. As I was reading it was becoming clear that the issue is not on the platform (Windows container). Nano Server images don't support MSI installations by design and that's mainly to 1) reduce footprint and 2) align with modern patterns. As you acknowledge later, this is a request for the MSVC team which I'm happy to pass it on.

With that said, I'll close the issue. A totally different conversation that could spin up from this is if we should support MSI installation on Nano Server, which in theory we don't think we will , but we're always looking for feedback from customers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Compatibility Cross-platform compatibility assurance
Projects
None yet
Development

No branches or pull requests

2 participants