[docker] Update dockerfile

This commit is contained in:
Laura Hausmann 2024-05-01 22:23:41 +02:00
parent eaf2b28770
commit cd9916faf5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -1,6 +1,5 @@
# To build with ILLink & AOT enabled, run docker build --target image-aot # To build with ILLink & AOT enabled, run docker build --target image-aot
# To build without VIPS support, run docker build --build-arg="VIPS=false" # To build without VIPS support, run docker build --build-arg="VIPS=false"
ARG VIPS=true
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS builder-jit FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS builder-jit
WORKDIR /src WORKDIR /src
@ -11,6 +10,7 @@ COPY Iceshrimp.Parsing/*.fsproj /src/Iceshrimp.Parsing/
COPY Iceshrimp.Frontend/*.csproj /src/Iceshrimp.Frontend/ COPY Iceshrimp.Frontend/*.csproj /src/Iceshrimp.Frontend/
COPY Iceshrimp.Shared/*.csproj /src/Iceshrimp.Shared/ COPY Iceshrimp.Shared/*.csproj /src/Iceshrimp.Shared/
WORKDIR /src/Iceshrimp.Backend WORKDIR /src/Iceshrimp.Backend
ARG VIPS=true
ARG TARGETARCH ARG TARGETARCH
RUN dotnet restore -a $TARGETARCH -p:BundleNativeDepsMusl=$VIPS -p:EnableLibVips=$VIPS RUN dotnet restore -a $TARGETARCH -p:BundleNativeDepsMusl=$VIPS -p:EnableLibVips=$VIPS
@ -32,6 +32,7 @@ COPY Iceshrimp.Parsing/*.fsproj /src/Iceshrimp.Parsing/
COPY Iceshrimp.Frontend/*.csproj /src/Iceshrimp.Frontend/ COPY Iceshrimp.Frontend/*.csproj /src/Iceshrimp.Frontend/
COPY Iceshrimp.Shared/*.csproj /src/Iceshrimp.Shared/ COPY Iceshrimp.Shared/*.csproj /src/Iceshrimp.Shared/
WORKDIR /src/Iceshrimp.Backend WORKDIR /src/Iceshrimp.Backend
ARG VIPS=true
ARG TARGETARCH ARG TARGETARCH
RUN dotnet restore -a $TARGETARCH -p:BundleNativeDeps=$VIPS -p:EnableLibVips=$VIPS RUN dotnet restore -a $TARGETARCH -p:BundleNativeDeps=$VIPS -p:EnableLibVips=$VIPS