-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-service
62 lines (56 loc) · 1.68 KB
/
Dockerfile-service
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
62
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build-env
ARG GITVERSION
WORKDIR /app
ARG GITVERSION
ARG PLUGINVERSION
# Copy csproj and restore as distinct layers
COPY eform-debian-service ./eform-debian-service
COPY eform-service-outer-inner-resource-plugin ./eform-service-outer-inner-resource-plugin
RUN dotnet publish -o out /p:Version=$GITVERSION --runtime linux-x64 --configuration Release eform-debian-service
RUN dotnet publish -o out/Plugins/ServiceOuterInnerResourcePlugin /p:Version=$PLUGINVERSION --runtime linux-x64 --configuration Release eform-service-outer-inner-resource-plugin
RUN pwd
RUN ls -lah out
RUN ls -lah out/Plugins
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble
WORKDIR /app
COPY --from=build-env /app/out .
ENV DEBIAN_FRONTEND noninteractive
ENV Logging__Console__FormatterName=
RUN mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1
RUN apt-get update && \
apt-get -y -q install \
libxml2 \
libgdiplus \
libc6-dev \
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", "MicrotingService.dll"]