PowerShell Core on smaller Linux distributions (eg. Alpine)
See original GitHub issueI’d like to try to get PowerShell Core working on Alpine Linux, with the long term goal of being able to run lightweight PowerShell Core Docker containers. The Docker container images I built using Ubuntu 16 and CentOS 7 are a bit on the large side.
So far, we know the following:
- .NET Core is included with the PowerShell Core distributions
- .NET Core has a dependency on
libicu52
andlibunwind8
What we need to figure out:
- How to install or compile
libicu52
on Alpine Linux - How to install or compile
libunwind8
on Alpine Linux - How to install or compile PowerShell Core binaries on Alpine Linux
Anyone want to provide some insight to this effort?
Cheers, Trevor Sullivan Docker Captain Microsoft MVP: Cloud & Data Center Management https://trevorsullivan.net https://twitter.com/pcgeek86
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Installing PowerShell on Alpine Linux
Information about installing PowerShell on Alpine Linux.
Read more >Creating a Multiplatform Powershell Core App Container
The PowerShell team produces Core images for Windows and Linux. ... I want the smallest possible images, which means using Nano Server ...
Read more >How to Use Microsoft PowerShell Core on Linux Virtual ...
In this article, I'll install PowerShell Core on the Linux distribution known as Ubuntu. That being the case, I'll need to use a...
Read more >Install PowerShell on Linux
Learn about the Linux distributions supported by PowerShell. ... Alpine; Debian; Red Hat Enterprise Linux (RHEL); Ubuntu; Raspberry Pi OS ...
Read more >How to install PowerShell 7 on Linux
How do I install PowerShell on Linux? This guide has instructions using GUI and Terminal commands, including steps to fix dependency issues.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, I talked with the .NET team, and discovered that there’s a
microsoft/dotnet:core
image that’s only 250 MB. By inspecting theDockerfile
for .NET Core dependencies, I was able to produce a smaller Docker image for PowerShell Core, than what was possible with Ubuntu and CentOS 7. I used theDockerfile
statements from the .NET Core dependencies base image, and extended it to include PowerShell Core from a local build context. That avoided the need to installcurl
orwget
along with extra dependencies.Now, the Docker image based on Debian Jessie is only 334.3 MB.
https://twitter.com/pcgeek86/status/769239625047035904 https://hub.docker.com/r/trevorsullivan/powershell/
It’s still not as small as we could get with Alpine Linux, but it’s a huge improvement.
@pcgeek86 do our new containers fit your need?