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