-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Preservation
25 lines (22 loc) · 1.31 KB
/
Dockerfile-Preservation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["/API/OpenDMS.Admin.API/OpenDMS.Admin.API/OpenDMS.Admin.API.csproj", "OpenDMS.Admin.API/"]
COPY ["/Core/OpenDMS.Infrastructure.Database/OpenDMS.Infrastructure.Database.csproj", "lib/OpenDMS.Infrastructure.Database/"]
COPY ["/Core/OpenDMS.Infrastructure.VirtualFileSystem/OpenDMS.Infrastructure.VirtualFileSystem.csproj", "lib/OpenDMS.Infrastructure.VirtualFileSystem/"]
COPY ["/Core/OpenDMS.Domain/OpenDMS.Domain.csproj", "lib/OpenDMS.Domain/"]
COPY ["/Core/OpenDMS.MultiTenancy/OpenDMS.MultiTenancy.csproj", "lib/OpenDMS.MultiTenancy/"]
COPY ["/Workers/OpenDMS.Preservation/OpenDMS.Preservation.Core/OpenDMS.Preservation.Core.csproj", "lib/OpenDMS.Preservation.Core/"]
COPY . .
RUN dotnet build "Workers/OpenDMS.Preservation/OpenDMS.Preservation.API/OpenDMS.Preservation.API.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Workers/OpenDMS.Preservation/OpenDMS.Preservation.API/OpenDMS.Preservation.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
COPY certs/dms_cert.pfx .
ENV ASPNETCORE_URLS=https://+;http://+
ENV ASPNETCORE_HTTPS_PORT=443
ENTRYPOINT ["dotnet", "OpenDMS.Preservation.API.dll"]