Initial
This commit is contained in:
20
Dockerfile.api
Normal file
20
Dockerfile.api
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["LehrerApp.Api/LehrerApp.Api.csproj", "LehrerApp.Api/"]
|
||||
COPY ["LehrerApp.Sync/LehrerApp.Sync.csproj", "LehrerApp.Sync/"]
|
||||
COPY ["LehrerApp.Core/LehrerApp.Core.csproj", "LehrerApp.Core/"]
|
||||
COPY ["LehrerApp.Data/LehrerApp.Data.csproj", "LehrerApp.Data/"]
|
||||
RUN dotnet restore "LehrerApp.Api/LehrerApp.Api.csproj"
|
||||
COPY . .
|
||||
RUN dotnet publish "LehrerApp.Api/LehrerApp.Api.csproj" \
|
||||
-c Release -o /app/publish --no-restore
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
RUN mkdir -p /app/data
|
||||
ENTRYPOINT ["dotnet", "LehrerApp.Api.dll"]
|
||||
Reference in New Issue
Block a user