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