mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-09 18:06:22 +00:00
Small restructure Dockerfile
This commit is contained in:
parent
25dfcb30c1
commit
b48c351082
1 changed files with 12 additions and 7 deletions
19
Dockerfile
19
Dockerfile
|
@ -1,17 +1,22 @@
|
||||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["src/SteamOpenIdConnectProvider.csproj", "SteamOpenIdConnectProvider/"]
|
|
||||||
RUN dotnet restore "SteamOpenIdConnectProvider/SteamOpenIdConnectProvider.csproj"
|
# Copy the project file to create layer with packages
|
||||||
COPY ["src/", "SteamOpenIdConnectProvider/"]
|
COPY src/SteamOpenIdConnectProvider.csproj .
|
||||||
WORKDIR "/src/SteamOpenIdConnectProvider"
|
RUN dotnet restore ./SteamOpenIdConnectProvider.csproj
|
||||||
RUN dotnet build "SteamOpenIdConnectProvider.csproj" -c Release -o /app
|
|
||||||
|
# Copy the rest of the source
|
||||||
|
COPY src/* .
|
||||||
|
RUN dotnet build ./SteamOpenIdConnectProvider.csproj -c Release -o /app
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish "SteamOpenIdConnectProvider.csproj" -c Release -o /app
|
RUN dotnet publish ./SteamOpenIdConnectProvider.csproj -c Release -o /app
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app .
|
COPY --from=publish /app .
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
HEALTHCHECK CMD curl --fail http://localhost/health || exit 1
|
HEALTHCHECK CMD curl --fail http://localhost/health || exit 1
|
||||||
ENTRYPOINT ["dotnet", "SteamOpenIdConnectProvider.dll"]
|
ENTRYPOINT ["dotnet", "SteamOpenIdConnectProvider.dll"]
|
Loading…
Reference in a new issue