Squirrowse/Squirrowse.Service/Dockerfile
2019-11-05 13:01:38 +01:00

21 lines
712 B
Docker

FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
WORKDIR /app
EXPOSE 5000
EXPOSE 5001
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /src
COPY ["Squirrowse.Service/Squirrowse.Service.csproj", "Squirrowse.Service/"]
COPY ["Squirrowse.Core/Squirrowse.Core.csproj", "Squirrowse.Core/"]
RUN dotnet restore "Squirrowse.Service/Squirrowse.Service.csproj"
COPY . .
WORKDIR "/src/Squirrowse.Service"
RUN dotnet build "Squirrowse.Service.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Squirrowse.Service.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Squirrowse.Service.dll"]