forked from bcgov/schoolbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PDF.Dockerfile
61 lines (43 loc) · 1.52 KB
/
PDF.Dockerfile
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
58
59
60
61
FROM microsoft/dotnet:1.1.10-sdk-1.1.11
# Dockerfile for package PDF
# Install Node.js
RUN apt-get update \
&& apt-get upgrade -y --force-yes \
&& apt-get install rlwrap bzip2 \
&& rm -rf /var/lib/apt/lists/*;
RUN apt-get update \
&& apt-get upgrade -y --force-yes \
&& apt-get install -y --force-yes chrpath \
&& rm -rf /var/lib/apt/lists/*;
RUN apt-get update \
&& apt-get upgrade -y --force-yes \
&& apt-get install -y --force-yes libfreetype6 libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*;
RUN curl https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/nodejs_6.7.0-1nodesource1~jessie1_amd64.deb > node.deb \
&& dpkg -i node.deb \
&& rm node.deb
RUN apt-get update \
&& apt-get upgrade -y --force-yes \
&& rm -rf /var/lib/apt/lists/*;
# Setup the .NET Core application
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
# This setting is a workaround for issues with dotnet and certain docker versions
ENV LTTNG_UST_REGISTER_TIMEOUT 0
COPY PDF /app/PDF
WORKDIR /app/PDF/src/PDF.Server/
# setup the Node application.
ENV NODE_ENV production
RUN npm install
# setup the .NET Core application.
RUN dotnet restore PDF.Server.csproj
ENV ASPNETCORE_URLS http://*:8080
EXPOSE 8080
RUN dotnet publish PDF.Server.csproj -c Release -o /app/out
# copy the node.js portion of the application
COPY PDF/src/PDF.Server/pdf.js /app/out
COPY PDF/src/PDF.Server/package.json /app/out
COPY PDF/src/PDF.Server/Templates /app/out/Templates
WORKDIR /app/out
# restore Node packages.
RUN npm install
ENTRYPOINT ["dotnet", "/app/out/PDF.Server.dll"]