Coding/BinaryDad.Coding/Dockerfile

19 lines
585 B
Docker
Raw Normal View History

2024-01-17 03:00:56 +00:00
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
2022-06-25 16:55:54 +00:00
WORKDIR /app
2024-01-17 03:00:56 +00:00
EXPOSE 8080
2022-06-25 16:55:54 +00:00
2024-01-17 03:00:56 +00:00
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
2022-06-25 16:55:54 +00:00
WORKDIR /src
COPY ["BinaryDad.Coding/BinaryDad.Coding.csproj", "BinaryDad.Coding/"]
RUN dotnet restore "BinaryDad.Coding/BinaryDad.Coding.csproj"
COPY . .
WORKDIR "/src/BinaryDad.Coding"
RUN dotnet build "BinaryDad.Coding.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "BinaryDad.Coding.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BinaryDad.Coding.dll"]