forked from dotnet/dotnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfiles for Alpine 3.11 (dotnet#1562)
- Loading branch information
Showing
28 changed files
with
720 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:2.1-alpine3.11 | ||
|
||
# Install ASP.NET Core | ||
ENV ASPNETCORE_VERSION 2.1.14 | ||
|
||
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='d7ead16ac4825c9a0d2f77d8f643e3fa60e3abded17df6b788c3ab825df7821439c7ffc52aeb7c92529dd3d40c2e82bfa0f4e26b4f43228f4977b3db2f292c6b' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \ | ||
&& rm aspnetcore.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine:3.11 | ||
|
||
RUN apk add --no-cache \ | ||
ca-certificates \ | ||
\ | ||
# .NET Core dependencies | ||
krb5-libs \ | ||
libgcc \ | ||
libintl \ | ||
libssl1.1 \ | ||
libstdc++ \ | ||
lttng-ust \ | ||
tzdata \ | ||
userspace-rcu \ | ||
zlib | ||
|
||
# Configure web servers to bind to port 80 when present | ||
ENV ASPNETCORE_URLS=http://+:80 \ | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true \ | ||
# Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:2.1-alpine3.11 | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 2.1.14 | ||
|
||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='ca46796d73bbf24137ccfde60aeabce78218a3559469a7837f5a513e0f0b879d1ed895bd5d89c65fccd1aaa54ddae3f50a0ef03ef636d3cbaa607a8f353a54fb' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:2.1-alpine3.11 | ||
|
||
# Disable the invariant mode (set in base image) | ||
RUN apk add --no-cache icu-libs | ||
|
||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_SDK_VERSION 2.1.607 | ||
|
||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='61caf6602b8a2aa89769b3e91ddaec963d8ab9f802cd7f6c6da4f02426358712bc2bb0930e7ee3a81d75c7607039543b554cb8ed50e45610655f9e91ed0f2f17' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz | ||
|
||
# Enable correct mode for dotnet watch (only mode supported in a container) | ||
ENV DOTNET_USE_POLLING_FILE_WATCHER=true \ | ||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance | ||
NUGET_XMLDOC_MODE=skip | ||
|
||
# Trigger first run experience by running arbitrary cmd to populate local package cache | ||
RUN dotnet help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:3.0-alpine3.11 | ||
|
||
# Install ASP.NET Core | ||
ENV ASPNETCORE_VERSION 3.0.1 | ||
|
||
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='3945c64b36fd5a8bf9cf4427d0ff17280d929fb6c8b05a37b6f340e025a3936aa9f9aa709b95daf08fa6d33b6def3f04822265c160e81dc6ae46173019232ad8' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:3.0-alpine3.11-arm64v8 | ||
|
||
# Install ASP.NET Core | ||
ENV ASPNETCORE_VERSION 3.0.1 | ||
|
||
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-musl-arm64.tar.gz \ | ||
&& aspnetcore_sha512='716103e12b7d7c2b623fcd82a990f3772bede2fb0500fae9fb83de935f43d3b06e612f2dbe0eacde7abee8f49a24454e58e50537ad5d0977abe523f38a8d1e23' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM alpine:3.11 | ||
|
||
RUN apk add --no-cache \ | ||
ca-certificates \ | ||
\ | ||
# .NET Core dependencies | ||
krb5-libs \ | ||
libgcc \ | ||
libintl \ | ||
libssl1.1 \ | ||
libstdc++ \ | ||
zlib | ||
|
||
# Configure web servers to bind to port 80 when present | ||
ENV ASPNETCORE_URLS=http://+:80 \ | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true \ | ||
# Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM arm64v8/alpine:3.11 | ||
|
||
RUN apk add --no-cache \ | ||
ca-certificates \ | ||
\ | ||
# .NET Core dependencies | ||
krb5-libs \ | ||
libgcc \ | ||
libintl \ | ||
libssl1.1 \ | ||
libstdc++ \ | ||
zlib | ||
|
||
# Configure web servers to bind to port 80 when present | ||
ENV ASPNETCORE_URLS=http://+:80 \ | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true \ | ||
# Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.0-alpine3.11 | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 3.0.1 | ||
|
||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='90d2bdf1b774267a66daf18dfe0795348e8c2ef562d166d13f676eadcd130aa0f0bb96b4b2a39cb0486d8e483b6c4614b9f2e1c3a997ced293484f976f61bbe0' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.0-alpine3.11-arm64v8 | ||
|
||
# Install .NET Core | ||
ENV DOTNET_VERSION 3.0.1 | ||
|
||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-arm64.tar.gz \ | ||
&& dotnet_sha512='1d78dac1dd7db6585a10436a41440921f060de71daad155ca76451a472496d54eaec575b289556d51681855368fb23d301921fb2e0562d7f2ef7bc94ee5ddfb4' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.0-alpine3.11 | ||
|
||
# Disable the invariant mode (set in base image) | ||
RUN apk add --no-cache icu-libs | ||
|
||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 | ||
|
||
# Install .NET Core SDK | ||
ENV DOTNET_SDK_VERSION 3.0.101 | ||
|
||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='98cc98f58187d208bd388f8c71862ea75e50ca25666e265f40a4e7c28082c2784738172e8ae4af7815057f7c57072cbe4fc03301d01738fc1ed5bb5e4d30a363' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -xzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz | ||
|
||
# Unset the value from the base image | ||
ENV ASPNETCORE_URLS= \ | ||
# Enable correct mode for dotnet watch (only mode supported in a container) | ||
DOTNET_USE_POLLING_FILE_WATCHER=true \ | ||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance | ||
NUGET_XMLDOC_MODE=skip | ||
|
||
# Trigger first run experience by running arbitrary cmd | ||
RUN dotnet help | ||
|
||
# Install PowerShell global tool | ||
ENV POWERSHELL_VERSION=7.0.0-preview.4 \ | ||
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Alpine-3.10 | ||
|
||
RUN wget -O PowerShell.Linux.Alpine.$POWERSHELL_VERSION.nupkg https://pwshtool.blob.core.windows.net/tool/$POWERSHELL_VERSION/PowerShell.Linux.Alpine.$POWERSHELL_VERSION.nupkg \ | ||
&& powershell_sha512='25dc93d87e4a0ae94fd161ff3b2d26b0e0eb5ae69a913500f7816debd705d1b84fcebb147b8a02d5fc53cf2718ec3d65dc0f2b73e0e4b917599b6562cf140c39' \ | ||
&& echo "$powershell_sha512 PowerShell.Linux.Alpine.$POWERSHELL_VERSION.nupkg" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/powershell \ | ||
&& dotnet tool install --add-source / --tool-path /usr/share/powershell --version $POWERSHELL_VERSION PowerShell.Linux.Alpine \ | ||
&& rm PowerShell.Linux.Alpine.$POWERSHELL_VERSION.nupkg \ | ||
&& ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ | ||
&& chmod 755 /usr/share/powershell/pwsh \ | ||
# To reduce image size, remove the copy nupkg that nuget keeps. | ||
&& find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm \ | ||
# Add ncurses-terminfo-base to resolve psreadline dependency | ||
&& apk add --no-cache ncurses-terminfo-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:3.1-alpine3.11 | ||
|
||
# Install ASP.NET Core | ||
RUN aspnetcore_version=3.1.0 \ | ||
&& wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='fa5e4ae71134a8a6db4ad6a247d3e31406673e03f0a64f7faaad3d84cfb3b70d2cf69e9d9abc1f8688138907d4ddd37cd908669999d85a87892e164053c63847' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:3.1-alpine3.11-arm64v8 | ||
|
||
# Install ASP.NET Core | ||
RUN aspnetcore_version=3.1.0 \ | ||
&& wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-arm64.tar.gz \ | ||
&& aspnetcore_sha512='6244dd1dd7d18f00bcc6a1faa2b6da61bc3edc9748f9513b617c84b1c2cb04d3b7328f398ce9a1e9834db56bb6246756b7c5409c179000eaab113a88a2da5b3a' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.1-alpine3.11 | ||
|
||
# Install .NET Core | ||
RUN dotnet_version=3.1.0 \ | ||
&& wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='040e55c341aa15357bd7e1ee4fd421f13056aac2eaf9f327c77fd1948fbe963d23a66cc5ffdfaa232407853fd250922327107e2878bf0af9a7652fd2c4c46815' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.1-alpine3.11-arm64v8 | ||
|
||
# Install .NET Core | ||
RUN dotnet_version=3.1.0 \ | ||
&& wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-arm64.tar.gz \ | ||
&& dotnet_sha512='417858bb24e1ec7337c7b85dd2c16ba3b16182bb0839e7c67d46b4ba38d430dd95a58e5ec533586c0cd4b69fc0f82323297eb4c5fbd8c2e8a5f9a1d36a3658f9' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
FROM $REPO:3.1-alpine3.11 | ||
|
||
ENV \ | ||
# Unset the value from the base image | ||
ASPNETCORE_URLS= \ | ||
# Disable the invariant mode (set in base image) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
# Enable correct mode for dotnet watch (only mode supported in a container) | ||
DOTNET_USE_POLLING_FILE_WATCHER=true \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance | ||
NUGET_XMLDOC_MODE=skip \ | ||
# PowerShell telemetry for docker image usage | ||
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Alpine-3.10 | ||
|
||
# Add dependencies for disabling invariant mode (set in base image) | ||
RUN apk add --no-cache icu-libs | ||
|
||
# Install .NET Core SDK | ||
RUN dotnet_sdk_version=3.1.100 \ | ||
&& wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$dotnet_sdk_version/dotnet-sdk-$dotnet_sdk_version-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='517c1dadbc9081e112f75589eb7160ef70183eb3d93fd55800e145b21f4dd6f5fbe19397ee7476aa16493e112ef95b311ff61bb08d9231b30a7ea609806d85ee' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz \ | ||
# Trigger first run experience by running arbitrary cmd | ||
&& dotnet help | ||
|
||
# Install PowerShell global tool | ||
RUN powershell_version=7.0.0-rc.1 \ | ||
&& wget -O PowerShell.Linux.Alpine.$powershell_version.nupkg https://pwshtool.blob.core.windows.net/tool/$powershell_version/PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& powershell_sha512='f7c2172ba1ef2a82a14501922e3235f85c35ccb8c1a1405302f1b5280c49312de63098af09c7dbe836ed5db989174528d695e352cc8152ad5f7d75bae9efdd33' \ | ||
&& echo "$powershell_sha512 PowerShell.Linux.Alpine.$powershell_version.nupkg" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/powershell \ | ||
&& dotnet tool install --add-source / --tool-path /usr/share/powershell --version $powershell_version PowerShell.Linux.Alpine \ | ||
&& dotnet nuget locals all --clear \ | ||
&& rm PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& chmod 755 /usr/share/powershell/pwsh \ | ||
&& ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ | ||
# To reduce image size, remove the copy nupkg that nuget keeps. | ||
&& find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm \ | ||
# Add ncurses-terminfo-base to resolve psreadline dependency | ||
&& apk add --no-cache ncurses-terminfo-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.