You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation only describe how to install winget into windows 10 with ms store. But tool more useful in docker when you install applications all the time. Could we have description how to install tool in docker and SAC windows server - when no gui & store available please?
The problem is that AppInstallerCLI.exe (winget.exe) does not run in a Windows Docker Container.
At least not a Container from this docker image mcr.microsoft.com/windows:2004
The command 'cmd /S /C AppInstallerCLI.exe' returned a non-zero code: 3221225781
There is no documentation, so no. I could install winget in docker (based on servercore2004 image) according Patrick's instructions (which are still not a documentation which most users can find), but it does not work for me after that, I guess more dependencies are missing:
I get the following when trying to install winget in my Dockerfile. I think proper instructions on how to do this would be very useful.
Add-AppPackage -Path "C:\TEMP\Microsoft.DesktopAppInstaller.msixbundle"
Add-AppPackage : Deployment failed with HRESULT: 0x80073D19, An error occurred
because a user was logged off.
Unspecified error
NOTE: For additional information, look for [ActivityId]
40991304-8568-0000-e6d0-ef406885d701 in the Event Log or use the command line
Get-AppPackageLog -ActivityID 40991304-8568-0000-e6d0-ef406885d701
At line:1 char:1
+ Add-AppPackage -Path C:\TEMP\Microsoft.DesktopAppInstaller.msixbundle
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\TEMP\Microso...ller.msixbundle
:String) [Add-AppxPackage], Exception
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageMa
nager.Commands.AddAppxPackageCommand
vedantmgoyal2009 we're not able to support Windows Server SKUs at this time. We're going to hold off on posting instructions for a non-supported configuration. We are working with several other teams on all the dependencies to identify the areas of concern related to Windows Server. This will likely be a very long lead time. The support matrix for Server SKUs and LTSC SKUs is quite complex.
Disclaimer: This isn't supported by Microsoft. Don't open issues if something winget related doesn't work inside this container.
Open the MSIX file from GitHub Releases as a zip file (change the extension), and inside of it, find the file "AppInstaller_x64.msix" and extract it as a zip file too. Find the files "AppInstallerCLI.exe" and "resources.pri" inside of that zip, and put them next to this Dockerfile:
Easton Pillay (@jedieaston) I haven't used Docker on Windows. Is it possible to use PowerShell to add the package using the license from the GitHub release on a Windows 10 image?
The images are based on Server but it should be. I haven't tried it yet, given the unzip method seems to work and installing winget the normal way doesn't (#1474 means we can't run winget.exe via docker exec).
Activity
driver1998 commentedon Jul 8, 2020
One hacky way would be extracting the AppInstaller msix (it is a zip file anyway) and run winget.exe from inside.
PatrikCarlander commentedon Aug 10, 2020
The problem is that AppInstallerCLI.exe (winget.exe) does not run in a Windows Docker Container.
At least not a Container from this docker image mcr.microsoft.com/windows:2004
The command 'cmd /S /C AppInstallerCLI.exe' returned a non-zero code: 3221225781
PatrikCarlander commentedon Aug 10, 2020
#This will work, Dockerfile that using winget to install packages
FROM mcr.microsoft.com/windows:2004
WORKDIR C:\Downloads
ADD https://aka.ms/vs/16/release/vc_redist.x64.exe C:\Downloads\vcredist_x64.exe
RUN C:\Downloads\vcredist_x64.exe /install /passive /norestart /log out.txt
WORKDIR C:\winget
#unzip and get AppInstallerCLI.exe (winget) and resources.pri from winget appxbundle file, inside AppInstaller_x64.appx (unzip)
ADD AppInstallerCLI.exe winget.exe
ADD resources.pri .
RUN winget install git
#RUN winget install Microsoft.VisualStudio.BuildTools
denelon commentedon Sep 16, 2020
Igor Kostenko (@isanych) has this Issue been resolved?
isanych commentedon Sep 17, 2020
There is no documentation, so no. I could install winget in docker (based on servercore2004 image) according Patrick's instructions (which are still not a documentation which most users can find), but it does not work for me after that, I guess more dependencies are missing:
PatrikCarlander commentedon Sep 17, 2020
I didn't based it on servercore2004 image, I based it on mcr.microsoft.com/windows:2004
My image is here https://hub.docker.com/repository/docker/patrikcarlander/buildtools.
I vote for that Microsoft should make it easy to install Winget in Docker.
Winget is very useful in Docker.
hjmallon commentedon Aug 5, 2021
I get the following when trying to install winget in my Dockerfile. I think proper instructions on how to do this would be very useful.
5 remaining items
vedantmgoyal9 commentedon Dec 17, 2021
Easton Pillay (@jedieaston) knows since he built the container. I have installed docker for the first-time today and doing experiments with it.
denelon commentedon Dec 20, 2021
vedantmgoyal2009 we're not able to support Windows Server SKUs at this time. We're going to hold off on posting instructions for a non-supported configuration. We are working with several other teams on all the dependencies to identify the areas of concern related to Windows Server. This will likely be a very long lead time. The support matrix for Server SKUs and LTSC SKUs is quite complex.
jedieaston commentedon Dec 23, 2021
Disclaimer: This isn't supported by Microsoft. Don't open issues if something winget related doesn't work inside this container.
Open the MSIX file from GitHub Releases as a zip file (change the extension), and inside of it, find the file "AppInstaller_x64.msix" and extract it as a zip file too. Find the files "AppInstallerCLI.exe" and "resources.pri" inside of that zip, and put them next to this Dockerfile:
Then use
docker runto get a shell, and do what you want.denelon commentedon Jan 8, 2022
Easton Pillay (@jedieaston) I haven't used Docker on Windows. Is it possible to use PowerShell to add the package using the license from the GitHub release on a Windows 10 image?
denelon commentedon Jan 8, 2022
This is similar if not a duplicate of #669
jedieaston commentedon Jan 10, 2022
The images are based on Server but it should be. I haven't tried it yet, given the unzip method seems to work and installing winget the normal way doesn't (#1474 means we can't run winget.exe via docker exec).