-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (30 loc) · 1.44 KB
/
Dockerfile
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
# Building accessmanagement frontend
FROM node:22-slim AS generate-accessmanagement-frontend
# FROM node:lts as generate-accessmanagement-frontend
WORKDIR /build
COPY . .
RUN corepack enable
RUN yarn --immutable
RUN yarn build
# Building the backend
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18 AS generate-accessmanagement-backend
WORKDIR /build
COPY backend .
RUN dotnet build src/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI.csproj -c Release -o /app_output
RUN dotnet publish src/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI.csproj -c Release -o /app_output
# Building the final image
FROM mcr.microsoft.com/dotnet/aspnet:8.0.6-alpine3.18 AS final
EXPOSE 80
#EXPOSE 443
WORKDIR /app
# ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
# DOTNET_RUNNING_IN_CONTAINER=true
ENV ASPNETCORE_ENVIRONMENT = Development
ENV ASPNETCORE_HTTP_PORTS = 80
RUN apk add --no-cache icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
COPY --from=generate-accessmanagement-backend /app_output .
COPY --from=generate-accessmanagement-frontend /build/dist/assets ./wwwroot/accessmanagement/assets
COPY --from=generate-accessmanagement-frontend /build/src/localizations ./wwwroot/accessmanagement/localizations
COPY --from=generate-accessmanagement-frontend /build/dist/manifest.json ./wwwroot/accessmanagement
RUN mkdir /tmp/logtelemetry
ENTRYPOINT ["dotnet", "Altinn.AccessManagement.UI.dll"]