From 946062a0aea4de88e1f690f2b89c6b6f5a3dd90d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 19 Jun 2024 14:23:49 +0200 Subject: [PATCH] [docker] Update Dockerfile Since https://github.com/dotnet/sdk/issues/32327 is resolved in net90, we no longer need to build with ubuntu. --- Dockerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73f5a412..a12dba2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,12 @@ # syntax=docker/dockerfile-upstream:master -# To build with AOT enabled, run docker build --build-arg="AOT=true" +# To build with ILLink & AOT enabled, run docker build --build-arg="AOT=true" # To build without VIPS support, run docker build --build-arg="VIPS=false" -# We have to build AOT images on linux-glibc, at least until .NET 9.0 (See https://github.com/dotnet/sdk/issues/32327 for details) - ARG AOT=false -ARG IMAGE=${AOT/true/wasm} +ARG IMAGE=${AOT/true/alpine-wasm} ARG IMAGE=${IMAGE/false/alpine} -ARG RUNNER=${AOT/true/noble-chiseled} -ARG RUNNER=${RUNNER/false/alpine} - FROM --platform=$BUILDPLATFORM iceshrimp.dev/iceshrimp/dotnet-sdk:8.0-$IMAGE AS builder WORKDIR /src ARG BUILDPLATFORM @@ -60,7 +55,7 @@ RUN --mount=type=cache,target=/root/.nuget \ # Enable globalization and time zones: # https://github.com/dotnet/dotnet-docker/blob/main/samples/enable-globalization.md # final stage/image -FROM mcr.microsoft.com/dotnet/aspnet:8.0-$RUNNER-composite AS image +FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine-composite AS image WORKDIR /app COPY --from=builder /app . USER app