-
Notifications
You must be signed in to change notification settings - Fork 908
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
Unexpected behavior while installing choco during docker build #3184
Comments
Looks like this is happening because of #2738 |
Please see the upgrade guide, specifically for the .NET 4.8 requirement. If you are using Docker, please use a Container that has .NET 4.8 installed or use the official Chocolatey Docker image. |
The documentation was updated earlier to specifically mention Docker. As there is nothing more for us to do here |
At least for ue4-docker, using Chocolatey Docker image is not an option because we need multiple different base Windows Core images (ltsc2019, ltsc2022 and others). I will later investigate the way official .NET 4.8 images install .NET so that it doesn't trigger this reboot exception. Possibly it can be integrated into Chocolatey. For now, we're locking Chocolatey to 1.4.0: adamrehn/ue4-docker#323 |
This is a workaround for chocolatey/choco#3184: Chocolatey 2.0.0 switched to .NET 4.8, but it throws an exception requiring a rebbot.
This is a workaround for chocolatey/choco#3184: Chocolatey 2.0.0 switched to .NET 4.8, but it throws an exception requiring a rebbot.
This is a workaround for chocolatey/choco#3184: Chocolatey 2.0.0 switched to .NET 4.8, but it throws an exception requiring a reboot.
workaround method, Install the specified version, do not use the latest version:
|
That is Ansible code and not applicable here. Chocolatey CLI 0.10.11 was released in May 2018 and is not supported. We don't recommend to use it. If you cannot use 2.0.0, use 1.4.0. |
Checklist
What You Are Seeing?
I am trying to install Chocolatey and then some packages with chocolatey during docker build on windows-2019 ltsc server code image. but i am facing below problem where chocolatey package is installing .NET 4.8 which subsequently asking for reboot which is not possible during docker build. Please help
`Step 7/26 : RUN set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); cmd /c choco install -y axel --params "'/InstallDir:C:\axel'"; cmd /c choco install -y prometheus-windows-exporter.install --version=0.16.0;
---> Running in 38af4cc4f032
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.0.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.0.0 to C:\Users\CONTAI
1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\CONTAINot using proxy.
Extracting C:\Users\CONTAI
1\AppData\Local\Temp\chocolatey\chocoInstall1\AppData\Local\Temp\ndp48-x86-x64-allos-enu.exe' - the installer is 100+ MBs, so this could take a while on a slow connection.Installing Chocolatey on the local machine
The registry key for .Net 4.8 was not found or this is forced
Downloading 'https://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/8494001c276a4b96804cde7829c04d7f/ndp48-x86-x64-allos-enu.exe' to 'C:\Users\CONTAI
Installing 'C:\Users\CONTAI~1\AppData\Local\Temp\ndp48-x86-x64-allos-enu.exe' - this may take awhile with no output.
.NET Framework 4.8 was installed, but a reboot is required.
Please reboot the system and try to install/upgrade Chocolatey again.
At C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\chocoInstall\t
ools\chocolateysetup.psm1:815 char:11
ain.:String) [], RuntimeException
s required.
Please reboot the system and try to install/upgrade Chocolatey again.
`
What is Expected?
Docker build succeeds without any such issues during chocolatey install.
How Did You Get This To Happen?
Below is part of Dockerfile i am using where i get this error
`FROM fluent/fluentd:v1.14.5-windows-ltsc2019-1.0 as fluent-base
RUN ridk exec gem install fluent-plugin-windows-eventlog
&& ridk exec gem install nokogiri
&& ridk exec gem install fluent-plugin-multi-format-parser
&& ridk exec gem install fluent-plugin-rewrite-tag-filter
&& ridk exec gem install fluent-plugin-parser-winevt_xml
ltsc2019 'tag' is updated with latest security patches every 2nd Tuesday of the month https://hub.docker.com/_/microsoft-windows-servercore
FROM mcr.microsoft.com/windows/servercore:ltsc2019
COPY --from=fluent-base /ruby27 /ruby27
RUN setx /M PATH "%PATH%;C:\ruby27\bin"
SHELL ["powershell", "-command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'));
cmd /c choco install -y axel --params "'/InstallDir:C:\axel'";
cmd /c choco install -y prometheus-windows-exporter.install --version=0.16.0; `
System Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: