FROM node:14-bullseye AS build WORKDIR /app ARG AZURE_DEVOPS_PAT COPY package.json package-lock.json ./ RUN npm install -g npm@8.19.4 RUN set -eu; \ test -n "${AZURE_DEVOPS_PAT:-}"; \ PAT_B64="$(printf '%s' "$AZURE_DEVOPS_PAT" | base64 | tr -d '\n')"; \ printf '%s\n' \ 'registry=https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/' \ 'always-auth=true' \ '//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:username=pat' \ "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:_password=${PAT_B64}" \ '//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:email=build@local' \ > .npmrc; \ npm ci --unsafe-perm --before=2025-09-01 --ignore-scripts; \ rm -f .npmrc COPY . ./ RUN npm run postinstall RUN npm run build FROM nginx:1.25-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/build /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]