Add project
This commit is contained in:
21
Api/Dockerfile
Normal file
21
Api/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||
WORKDIR /src
|
||||
|
||||
COPY ["Api/Api.csproj", "Api/"]
|
||||
COPY ["Common/Common.csproj", "Common/"]
|
||||
|
||||
RUN dotnet restore "Api/Api.csproj"
|
||||
|
||||
COPY . .
|
||||
|
||||
WORKDIR /src/Api
|
||||
|
||||
|
||||
RUN dotnet publish "Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["dotnet", "Api.dll"]
|
||||
Reference in New Issue
Block a user