ARG REPO=mcr.microsoft.com/dotnet/core/aspnet FROM $REPO:5.0-buster-slim-arm32v7 ENV \ # Unset ASPNETCORE_URLS from aspnet base image ASPNETCORE_URLS= \ DOTNET_SDK_VERSION=5.0.100-preview.6.20318.15 \ # 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 \ # PowerShell telemetry for docker image usage POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Debian-10-arm32 RUN apt-get update \ && apt-get install -y --no-install-recommends \ curl \ git \ wget \ && rm -rf /var/lib/apt/lists/* # Install .NET Core SDK RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-arm.tar.gz \ && dotnet_sha512='1dd5c4f90d43983f1b6ccfa7631fd70afe99b26c1111d191dccb860bcfa232052c3589147f730b583b3f498bcd1116a131fae462267b68a00c10d7e7d832e65f' \ && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ && mkdir -p /usr/share/dotnet \ && tar -C /usr/share/dotnet -oxzf dotnet.tar.gz ./packs ./sdk ./templates ./LICENSE.txt ./ThirdPartyNotices.txt \ && rm dotnet.tar.gz \ # Trigger first run experience by running arbitrary cmd && dotnet help # Install PowerShell global tool RUN powershell_version=7.1.0-preview.4 \ && curl -SL --output PowerShell.Linux.arm32.$powershell_version.nupkg https://pwshtool.blob.core.windows.net/tool/$powershell_version/PowerShell.Linux.arm32.$powershell_version.nupkg \ && powershell_sha512='8253cf32cb5aa7579a46605721f38ef2a3e02ef515481c243b9443645f6014ac397f00e07cd347a8c95583f4bc0a350b0b72a86275ddba737cef7482a03bd51f' \ && echo "$powershell_sha512 PowerShell.Linux.arm32.$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.arm32 \ && dotnet nuget locals all --clear \ && rm PowerShell.Linux.arm32.$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