]> git.somenet.org - pub/jan/aic18.git/blob - service-reporting/DOCKERFILE
merge branch '3-report-service' into 'master'
[pub/jan/aic18.git] / service-reporting / DOCKERFILE
1 FROM microsoft/dotnet:2.2.100-preview3-sdk AS build-env
2 WORKDIR /app
3
4 # Copy csproj and restore as distinct layers
5 COPY *.csproj ./
6 RUN dotnet restore
7
8 # Copy everything else and build
9 COPY . ./
10 RUN dotnet publish -c Release -o out
11
12 # Build runtime image
13 FROM microsoft/dotnet:2.2.0-preview3-aspnetcore-runtime
14 WORKDIR /app
15 COPY --from=build-env /app/out .
16
17 # copy pdf library
18 # COPY libwkhtmltox.* ./
19 # install additional libaries
20 RUN apt-get update \
21     && apt-get install -y --no-install-recommends \
22         zlib1g \
23         fontconfig \
24         libfreetype6 \
25         libx11-6 \
26         libxext6 \
27         libxrender1 \
28     && curl -o /usr/lib/libwkhtmltox.so \
29         --location \
30         https://github.com/rdvojmoc/DinkToPdf/raw/v1.0.8/v0.12.4/64%20bit/libwkhtmltox.so
31
32                 
33 # copy assets
34 COPY assets/*.css ./assets/             
35 ENTRYPOINT ["dotnet", "PdfService.dll"]