-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (30 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
35 lines (30 loc) · 1.23 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
FROM node:22-bookworm-slim as node-env
WORKDIR /app
ARG DISABLE_SENTRY
ENV PATH /app/node_modules/.bin:$PATH
ENV DISABLE_SENTRY=${DISABLE_SENTRY}
COPY eform-angular-frontend/eform-client ./
RUN yarn install
RUN yarn build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build-env
WORKDIR /app
ARG GITVERSION
ARG PLUGINVERSION
ARG DISABLE_SENTRY
# Copy csproj and restore as distinct layers
COPY eform-angular-frontend/eFormAPI/eFormAPI.Web ./eFormAPI.Web
COPY eform-angular-timeplanning-plugin/eFormAPI/Plugins/TimePlanning.Pn ./TimePlanning.Pn
RUN dotnet publish eFormAPI.Web -o eFormAPI.Web/out /p:Version=$GITVERSION --runtime linux-x64 --configuration Release
RUN dotnet publish TimePlanning.Pn -o TimePlanning.Pn/out /p:Version=$PLUGINVERSION --runtime linux-x64 --configuration Release
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble
WORKDIR /app
ARG DISABLE_SENTRY
ENV DISABLE_SENTRY=${DISABLE_SENTRY}
COPY --from=build-env /app/eFormAPI.Web/out .
RUN mkdir -p ./Plugins/TimePlanning.Pn
COPY --from=build-env /app/TimePlanning.Pn/out ./Plugins/TimePlanning.Pn
COPY --from=node-env /app/dist/browser wwwroot
ENV DEBIAN_FRONTEND noninteractive
ENV Logging__Console__FormatterName=
ENTRYPOINT ["dotnet", "eFormAPI.Web.dll"]