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

Docker image fails to build, required .net 4.8 #19

Open
richschulman2008 opened this issue Jun 9, 2024 · 0 comments
Open

Docker image fails to build, required .net 4.8 #19

richschulman2008 opened this issue Jun 9, 2024 · 0 comments

Comments

@richschulman2008
Copy link

running the dockerBuild.cmd fails to build docker image at step 5. Output below:

Step 5/12 : RUN choco install -y strawberryperl         && ren Strawberry Perl  && rd /s /q C:\Users\ContainerAdministrator\AppData\Local\Temp      && mkdir C:\Users\ContainerAdministrator\AppData\Local\Temp     && setx /m path "%path%;c:\perl\perl\bin"
 ---> Running in cd80ade0f04f
Chocolatey v2.3.0
.NET 4.8 is not installed or may need a reboot to complete installation.
Please install .NET Framework 4.8 manually and reboot the system.
Download at 'https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe'
The command 'cmd /S /C choco install -y strawberryperl  && ren Strawberry Perl  && rd /s /q C:\Users\ContainerAdministrator\AppData\Local\Temp      && mkdir C:\Users\ContainerAdministrator\AppData\Local\Temp     && setx /m path "%path%;c:\perl\perl\bin"' returned a non-zero code: 1

I found this solution on stack exchange https://stackoverflow.com/questions/76470752/chocolatey-installation-in-docker-started-to-fail-restart-due-to-net-framework. Replaced base docker image

# FROM mcr.microsoft.com/windows/servercore:ltsc2019
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016

Image build successfully after that. There is probably a more efficient way to solve this issue but I'm not a Windows dev (I just play one on TV)

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

No branches or pull requests

1 participant