[docker] Update Dockerfile
This commit is contained in:
parent
a3c3f6b848
commit
4a1cf59e23
1 changed files with 7 additions and 4 deletions
11
Dockerfile
11
Dockerfile
|
@ -16,14 +16,17 @@ RUN yarn --immutable && yarn build
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS backend
|
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS backend
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
WORKDIR /backend
|
WORKDIR /src
|
||||||
|
|
||||||
# copy csproj and restore as distinct layers
|
# copy csproj and restore as distinct layers
|
||||||
COPY Iceshrimp.Backend/*.csproj .
|
RUN mkdir Iceshrimp.Backend Iceshrimp.MfmSharp
|
||||||
|
COPY Iceshrimp.Backend/*.csproj Iceshrimp.Backend
|
||||||
|
COPY Iceshrimp.MfmSharp/*.csproj Iceshrimp.MfmSharp
|
||||||
|
WORKDIR /src/Iceshrimp.Backend
|
||||||
RUN dotnet restore -a $TARGETARCH
|
RUN dotnet restore -a $TARGETARCH
|
||||||
|
|
||||||
# copy backend files
|
# copy files required for backend build
|
||||||
COPY Iceshrimp.Backend/. .
|
COPY ./. /src
|
||||||
|
|
||||||
# it's faster if we copy this later because we can parallelize it with buildkit, but the build fails if this file doesn't exist
|
# it's faster if we copy this later because we can parallelize it with buildkit, but the build fails if this file doesn't exist
|
||||||
RUN mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
|
RUN mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
|
||||||
|
|
Loading…
Add table
Reference in a new issue