-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile-big
61 lines (54 loc) · 1.42 KB
/
Dockerfile-big
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 node:18.12.1 as node-env
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY eform-client ./
RUN npm install
RUN npm run build
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app
ARG GITVERSION
# Copy csproj and restore as distinct layers
COPY eFormAPI/eFormAPI.Web ./
RUN dotnet publish -o out /p:Version=$GITVERSION --runtime linux-x64 --configuration Release
RUN pwd
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build-env /app/out .
COPY --from=node-env /app/dist wwwroot
RUN rm connection.json; exit 0
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1
RUN apt-get update && \
apt-get -y -q install \
libreoffice \
libreoffice-writer \
ure \
libreoffice-java-common \
libreoffice-core \
libreoffice-common \
fonts-opensymbol \
hyphen-fr \
hyphen-de \
hyphen-en-us \
hyphen-it \
hyphen-ru \
fonts-dejavu \
fonts-dejavu-core \
fonts-dejavu-extra \
fonts-droid-fallback \
fonts-dustin \
fonts-f500 \
fonts-fanwood \
fonts-freefont-ttf \
fonts-liberation \
fonts-lmodern \
fonts-lyx \
fonts-sil-gentium \
fonts-texgyre \
fonts-tlwg-purisa && \
apt-get -y -q remove libreoffice-gnome && \
apt -y autoremove && \
rm -rf /var/lib/apt/lists/*
RUN adduser --home=/opt/libreoffice --disabled-password --gecos "" --shell=/bin/bash libreoffice
ENTRYPOINT ["dotnet", "eFormAPI.Web.dll"]