Repository navigation
Can we get a release that runs on Alpine? #4605
Description
Activity
- addedWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the buildIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
on Aug 17, 2017 Are you able to use the AppImage?
I tried and couldn't get it to work. I don't see it in their list of supported os's.
I took a stab at running the Appimage in Alpine. It looks like you could do it only if you have a full glibc chroot. The primary issue seems to be the musl libc that alpine uses and Appimage is made for glibc environments. It certainly increases the size of Alpine if you have to tack on a full glibc chroot to run the Appimage.
Steve Lee (@SteveL-MSFT) any thoughts on this? Adding an apk package would make it so I could start using it in most of my tools containers and I'm sure I'm not the only one.
Jason Morgan (@JasonMorgan) Alpine isn't one of the official supported OS for corefx, so for us this isn't currently a priority. If a community PR makes it work, we'd be happy to take that change and start producing packages.
- addedUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
on Aug 28, 2017 Looks like Alpine is sort of supported by CoreCLR, they have a build, but it doesn't appear to be tested regularly.
dotnet/coreclr#917 It looks like they are still working the kinks out.
dotnet/dotnet-docker#22 and dotnet/announcements#49 looks like they added an alpine docker for .NET Core. https://github.com/dotnet/dotnet-docker-samples/tree/master/dotnetapp-prod-alpine-preview so it should be theoretically possible to get a pwsh docker from that now.
kasper3 I can confirm the install script doesn't handle alpine yet. I'm looking at building from source myself now. I'll let you know if I get it.
So looks like you need the dotnet sdk, not just dotnet to get powershell built from source. I'll wait for dotnet 2.1 to go GA, should be January according to the release notes before trying to go through the powershell build steps again.
Also just to address your question from before,
./PowerShell/tools/install-powershell.shseems to just use the OS based package manager and doesn't support alpine yet.yea, for Alpine you would need to get the tool chain added manually and then build manually. at least that is my understanding.
Reacted by Jason Morgan27 remaining items
Hey guys. I wanted to ask if this is ready to use yet. We basically have a dockerfile that has this at the top:
FROM node:alpineAnd I want to know if I can get powershell inside that docker image?
massimonewsuk unfortunately this won't happen for Preview2, I'm planning on working on this next week
Steve Lee (@SteveL-MSFT) any news on this?
Reacted by Aaron StainbackWas hoping to have an Alpine release along with Preview.4. Next week we'll be working on producing a docker image release.
Steve Lee (@SteveL-MSFT) Hey is there any update on this?
Reacted by Aaron StainbackTravis Plunk (@TravisEz13) is looking at this, however, it's currently a lower priority than preparing for the GA release. Although we have updated the tooling to build PowerShell Core on Alpine, it wasn't complete as it didn't do a module restore and thus the resulting Alpine package didn't have any modules even though the engine/console worked. Travis has an idea on how to resolve this.
Reacted by massimonewsukI have a PR here PowerShell/PowerShell-Docker#37 for the docker image.
There are two issues:
- The version is
6.1.0-fixalpine. The code is the same as6.1.0-rc.1but there were some build issues, and this is what our build system does when you build from a private branch. - There are some rendering issues in the console (see image below.) You can avoid these issues by changing
docker run -ittodocker run -i, but you loose tab completion.
You can try my image:
docker run -it travisez13/powershell:preview-alpine-3.8Consider this highly experimental.
- The version is
Open new issues for for specific problems
fyi, the container is available via
docker run -it mcr.microsoft.com/powershell:preview-alpine-3.8Reacted by Ayan Mullickalexandair commented
on Sep 15, 2018 ContributorMore actionsTravis Plunk (@TravisEz13) Container is available. but is practically unusable. You cannot type anything. :(
Aleksandar Nikolić (@alexandair) Yes, but we need something to bootstrap real development. It works for automation. I mentioned this issue here: #4605 (comment)
We now need to update the build to use this image and to a PSModuleRestore.
- added a commit that references this issue
on Aug 6, 2026

Could we get an apk package for alpine linux? The main reason we don't use powershell as part of our ci/cd pipeline is that all our tasks run in alpine containers.