

Docker/Initial_Setup_Base_Images/Dockerfile-aspnetcore7.0-base -t aspnetcore7. shared/ \ĬOPY -from=installer ĭocker build -f. & echo "$aspnetcore_sha512 " | sha512sum -c - \ & curl -fSL -output $aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-圆4.tar.gz \ Ģ -Then build an ASPNET 7.0.7 runtime image using: ARG REPO=/dotnet/runtimeįROM amd64/buildpack-deps:jammy-curl AS installer Docker/Initial_Setup_Base_Images/Dockerfile-aspnetcore-sdk7.0-base -t aspnetcore7_sdk. & find /usr/share/powershell -print | grep -i '.*nupkg$' | xargs rmĭocker build -f. # To reduce image size, remove the copy nupkg that nuget keeps. & ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ & rm PowerShell.Linux.圆4.$powershell_version.nupkg \ & dotnet tool install -add-source / -tool-path /usr/share/powershell -version $powershell_version PowerShell.Linux.圆4 \ & echo "$powershell_sha512 PowerShell.Linux.圆4.$powershell_version.nupkg" | sha512sum -c - \ & curl -fSL -output PowerShell.Linux.圆4.$powershell_version.nupkg $powershell_version/PowerShell.Linux.圆4.$powershell_version.nupkg \ # Trigger first run experience by running arbitrary cmd RUN curl -fSL -output $DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-圆4.tar.gz \ & apt-get install -y -no-install-recommends \ POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-22.04

# PowerShell telemetry for docker image usage # Skip extraction of XML docs - generally not useful within an image/container - helps performance # Enable correct mode for dotnet watch (only mode supported in a container) # Unset ASPNETCORE_URLS from aspnet base imageĭOTNET_GENERATE_ASPNET_CERTIFICATE=false \ I have used the following 3 docker files to build my aspnet core 7.0 web app for around 6 months without an issue on my iMac Pro using the latest OS version with all updgaded software running Docker Desktop for MAC.ġ - I build an ASPNET 7.0 SDK using: ARG REPO=/dotnet/aspnet
