Update Dockerfile

This commit is contained in:
Enes Sadık Özbek 2019-10-13 17:20:08 +03:00
parent d737eefcd9
commit f14105e9b0

View file

@ -1,15 +1,16 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build
WORKDIR /src
COPY ["src/SteamOpenIdConnectProxy.csproj", "SteamOpenIdConnectProxy/"]
RUN dotnet restore "SteamOpenIdConnectProxy/SteamOpenIdConnectProxy.csproj"
COPY ["src/", "SteamOpenIdConnectProxy/"]
WORKDIR "/src/SteamOpenIdConnectProxy"
RUN dotnet build "SteamOpenIdConnectProxy.csproj" -c Release -o /app
COPY ["src/SteamOpenIdConnectProvider.csproj", "SteamOpenIdConnectProvider/"]
RUN dotnet restore "SteamOpenIdConnectProvider/SteamOpenIdConnectProvider.csproj"
COPY ["src/", "SteamOpenIdConnectProvider/"]
WORKDIR "/src/SteamOpenIdConnectProvider"
RUN dotnet build "SteamOpenIdConnectProvider.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "SteamOpenIdConnectProxy.csproj" -c Release -o /app
RUN dotnet publish "SteamOpenIdConnectProvider.csproj" -c Release -o /app
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0 AS base
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "SteamOpenIdConnectProxy.dll"]
HEALTHCHECK CMD curl --fail http://localhost:5000/health || exit 1
ENTRYPOINT ["dotnet", "SteamOpenIdConnectProvider.dll"]