mirror of
https://github.com/D4M13N-D3V/comissions-app-core-api.git
synced 2025-03-14 01:54:55 +00:00
25 lines
809 B
Docker
25 lines
809 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
USER $APP_UID
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
EXPOSE 8081
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
COPY ["/src/ArtPlatform.API/ArtPlatform.API.csproj", "ArtPlatform.API/"]
|
|
COPY ["/src/ArtPlatform.Database/ArtPlatform.Database.csproj", "ArtPlatform.Database/"]
|
|
RUN dotnet restore "ArtPlatform.API/ArtPlatform.API.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/ArtPlatform.API"
|
|
RUN dotnet build "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
|
|
FROM build AS publish
|
|
ARG BUILD_CONFIGURATION=Release
|
|
RUN dotnet publish "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "ArtPlatform.API.dll"]
|