[docker] Update Dockerfile

This commit is contained in:
Laura Hausmann 2024-04-01 21:55:41 +02:00
parent 16cbff14b1
commit d0d0d444ab
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -3,17 +3,15 @@ ARG TARGETARCH
WORKDIR /src WORKDIR /src
# copy csproj/fsproj and restore as distinct layers # copy csproj/fsproj and restore as distinct layers
RUN mkdir Iceshrimp.Backend Iceshrimp.Parsing Iceshrimp.Frontend COPY Iceshrimp.Backend/*.csproj /src/Iceshrimp.Backend/
COPY Iceshrimp.Backend/*.csproj /src/Iceshrimp.Backend COPY Iceshrimp.Parsing/*.fsproj /src/Iceshrimp.Parsing/
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/
WORKDIR /src/Iceshrimp.Backend WORKDIR /src/Iceshrimp.Backend
RUN dotnet restore -a $TARGETARCH RUN dotnet restore -a $TARGETARCH
# copy build files # copy build files
COPY Iceshrimp.Backend/. /src/Iceshrimp.Backend COPY . /src/
COPY Iceshrimp.Parsing/. /src/Iceshrimp.Parsing
COPY Iceshrimp.Frontend/. /src/Iceshrimp.Frontend
# build # build
RUN dotnet publish --no-restore -a $TARGETARCH -o /app RUN dotnet publish --no-restore -a $TARGETARCH -o /app