]> git.somenet.org - pub/jan/aic18.git/blob - service-reporting/Dockerfile
GITOLITE.txt
[pub/jan/aic18.git] / service-reporting / Dockerfile
1 FROM microsoft/dotnet:2.2-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-aspnetcore-runtime
15 LABEL maintainer="Fabian Eichhorner <fabian.eichhorner@tuwien.ac.at>"
16 WORKDIR /app
17 COPY --from=build-env /app/out .
18
19 # set ports
20 EXPOSE 8083             
21 ENV ASPNETCORE_URLS=http://+:8083
22
23 # install pdf libaries
24 RUN apt-get update \
25     && apt-get install -y --no-install-recommends \
26         zlib1g \
27         fontconfig \
28         libfreetype6 \
29         libx11-6 \
30         libxext6 \
31         libxrender1 \
32     && curl -o /usr/lib/libwkhtmltox.so \
33         --location \
34         https://github.com/rdvojmoc/DinkToPdf/raw/v1.0.8/v0.12.4/64%20bit/libwkhtmltox.so
35
36 # copy assets
37 COPY assets/*.* ./assets/               
38 ENTRYPOINT ["dotnet", "PdfService.dll"]