leaky-ships/backend/LeakyShipsAPI/Dockerfile
aronmal cf92993e8a
Corrected project name
Replaced "Sinky" with "Leaky" in the backend
2022-08-06 22:30:25 +02:00

20 lines
571 B
Docker

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["LeakyShipsAPI/LeakyShipsAPI.csproj", "LeakyShipsAPI/"]
RUN dotnet restore "LeakyShipsAPI/LeakyShipsAPI.csproj"
COPY . .
WORKDIR "/src/LeakyShipsAPI"
RUN dotnet build "LeakyShipsAPI.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "LeakyShipsAPI.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "LeakyShipsAPI.dll"]