-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Workflow
57 lines (46 loc) · 1.91 KB
/
Dockerfile-Workflow
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 443
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --allow-unauthenticated \
fonts-dejavu-core \
fonts-liberation \
fonts-noto-cjk \
fonts-noto-color-emoji \
fonts-noto-core \
fonts-noto-extra \
fonts-opensymbol \
fonts-symbola \
ghostscript \
libgdiplus libc6-dev \
libx11-dev \
xfonts-75dpi \
fontconfig \
xfonts-base \
pdftohtml \
wget
RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_amd64.deb
RUN dpkg -i wkhtmltox_0.12.6.1-3.bullseye_amd64.deb
RUN apt --fix-broken install
RUN rm wkhtmltox_0.12.6.1-3.bullseye_amd64.deb
RUN apt-get --no-install-recommends install libreoffice -y
RUN apt-get install -y libreoffice-java-common
RUN apt-get install unoconv
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["/API/OpenDMS.Workflow.API/OpenDMS.Workflow.API/OpenDMS.Workflow.API.csproj", "OpenDMS.Workflow.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 . .
RUN dotnet build "API/OpenDMS.Workflow.API/OpenDMS.Workflow.API/OpenDMS.Workflow.API.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "API/OpenDMS.Workflow.API/OpenDMS.Workflow.API/OpenDMS.Workflow.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.Workflow.API.dll"]