-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-service
More file actions
55 lines (49 loc) · 2.17 KB
/
Dockerfile-service
File metadata and controls
55 lines (49 loc) · 2.17 KB
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
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build-env
ARG GITVERSION
WORKDIR /app
ARG GITVERSION
ARG PLUGINVERSION
ARG PLUGIN2VERSION
ARG PLUGIN3VERSION
ARG PLUGIN4VERSION
ARG PLUGIN5VERSION
# Copy csproj and restore as distinct layers
COPY eform-debian-service ./eform-debian-service
COPY eform-service-items-planning-plugin ./eform-service-items-planning-plugin
COPY eform-service-workflow-plugin ./eform-service-workflow-plugin
COPY eform-service-timeplanning-plugin ./eform-service-timeplanning-plugin
COPY eform-service-backendconfiguration-plugin ./eform-service-backendconfiguration-plugin
RUN dotnet publish -o out /p:Version=$GITVERSION --runtime linux-x64 --configuration Release eform-debian-service
RUN dotnet publish -o out/Plugins/ServiceItemsPlanningPlugin /p:Version=$PLUGINVERSION --runtime linux-x64 --configuration Release eform-service-items-planning-plugin
RUN dotnet publish -o out/Plugins/ServiceWorkflowPlugin /p:Version=$PLUGIN3VERSION --runtime linux-x64 --configuration Release eform-service-workflow-plugin
RUN dotnet publish -o out/Plugins/ServiceTimePlanningPlugin /p:Version=$PLUGIN4VERSION --runtime linux-x64 --configuration Release eform-service-timeplanning-plugin
RUN dotnet publish -o out/Plugins/ServiceBackendConfigurationPlugin /p:Version=$PLUGIN5VERSION --runtime linux-x64 --configuration Release eform-service-backendconfiguration-plugin
RUN pwd
RUN ls -lah out
RUN ls -lah out/Plugins
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble
WORKDIR /app
COPY --from=build-env /app/out .
ENV DEBIAN_FRONTEND=noninteractive
ENV Logging__Console__FormatterName=
RUN mkdir -p /usr/share/man/man1 && \
apt-get update && \
apt-get install -y -q --no-install-recommends \
libxml2 \
libgdiplus \
libc6-dev \
libreoffice-writer \
libreoffice-core \
fonts-liberation \
fonts-dejavu-core \
fonts-freefont-ttf \
hyphen-en-us && \
apt-get -y -q remove libreoffice-gnome || true && \
apt-get clean && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /opt/libreoffice && chown -R $APP_UID:$APP_UID /app /opt/libreoffice
ENV HOME=/opt/libreoffice
USER $APP_UID
ENTRYPOINT ["dotnet", "MicrotingService.dll"]