Replies: 17 comments 9 replies
-
One hacky way would be extracting the AppInstaller msix (it is a zip file anyway) and run winget.exe from inside. |
Beta Was this translation helpful? Give feedback.
-
The problem is that AppInstallerCLI.exe (winget.exe) does not run in a Windows Docker Container. The command 'cmd /S /C AppInstallerCLI.exe' returned a non-zero code: 3221225781 |
Beta Was this translation helpful? Give feedback.
-
#This will work, Dockerfile that using winget to install packages WORKDIR C:\Downloads WORKDIR C:\winget ADD AppInstallerCLI.exe winget.exe RUN winget install git |
Beta Was this translation helpful? Give feedback.
-
@isanych has this Issue been resolved? |
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
@denelon I already install WinGet in GitHub Runner which runs Windows Server 2019 (also tested on 2022) so can I publish those instructions only or will there be anything else? |
Beta Was this translation helpful? Give feedback.
-
For docker, @jedieaston has built a container that is available on the docker hub. |
Beta Was this translation helpful? Give feedback.
-
Where is Dockerfile for this container? |
Beta Was this translation helpful? Give feedback.
-
@jedieaston knows since he built the container. I have installed docker for the first-time today and doing experiments with it. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
@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? |
Beta Was this translation helpful? Give feedback.
-
This is similar if not a duplicate of #669 |
Beta Was this translation helpful? Give feedback.
-
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). |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions