UserPointManagement/Dockerfile

27 lines
654 B
Docker

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /docker
EXPOSE 5000
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /build
COPY . .
RUN dotnet restore src/UserPointManagement.Web/UserPointManagement.Web.csproj --configfile ./NuGet.Config
WORKDIR src/UserPointManagement.Web
RUN dotnet build UserPointManagement.Web.csproj -c Release
FROM build AS publish
RUN dotnet publish UserPointManagement.Web.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENV ASPNETCORE_URLS http://*:5000
ENV TZ Asia/Shanghai
ENV Connection__UserPointManagement=""
ENTRYPOINT ["dotnet", "UserPointManagement.Web.dll"]