Install the .NET SDK or the .NET Runtime on Alpine
This article describes how to install .NET on Alpine. When an Alpine version falls out of support, .NET is no longer supported with that version. However, these instructions may help you to get .NET running on those versions, even though it isn't supported.
Install the SDK (which includes the runtime) if you want to develop .NET apps. Or, if you only need to run apps, install the Runtime. If you're installing the Runtime, we suggest you install the ASP.NET Core Runtime as it includes both .NET and ASP.NET Core runtimes.
If you've already installed the SDK or Runtime, use the
dotnet --list-sdks and
dotnet --list-runtimes commands to see which versions are installed. For more information, see How to check that .NET is already installed.
Installers aren't available for Alpine Linux. You must install .NET in one of the following ways:
The following table is a list of currently supported .NET releases and the versions of Alpine they're supported on. These versions remain supported until either the version of .NET reaches end-of-support or the version of Alpine reaches end-of-life.
- A ✔️ indicates that the version of Alpine or .NET is still supported.
- A ❌ indicates that the version of Alpine or .NET isn't supported on that Alpine release.
- When both a version of Alpine and a version of .NET have ✔️, that OS and .NET combination is supported.
|Alpine||.NET Core 3.1||.NET 6|
|✔️ 3.15||✔️ 3.1||✔️ 6.0|
|✔️ 3.14||✔️ 3.1||✔️ 6.0|
|✔️ 3.13||✔️ 3.1||✔️ 6.0|
|✔️ 3.12||✔️ 3.1||✔️ 6.0|
|❌ 3.11||✔️ 3.1||❌ 6.0|
|❌ 3.10||✔️ 3.1||❌ 6.0|
|❌ 3.9||✔️ 3.1||❌ 6.0|
|❌ 3.8||✔️ 3.1||❌ 6.0|
The following versions of .NET are ❌ no longer supported:
- .NET 5
- .NET Core 3.0
- .NET Core 2.2
- .NET Core 2.1
- .NET Core 2.0
.NET on Alpine Linux requires the following dependencies installed:
- libgdiplus (if the .NET app requires the System.Drawing.Common assembly)
- libssl1.1 (Alpine v3.9 or greater)
- libssl1.0 (Alpine v3.8 or lower)
To install the needed requirements, run the following command:
apk add bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
To install libgdiplus, you may need to specify a repository:
apk add libgdiplus --repository https://dl-3.alpinelinux.org/alpine/edge/testing/
Submit and view feedback for