diff --git a/LCU.WebApps.Collections.RepoClient/Dockerfile b/LCU.WebApps.Collections.RepoClient/Dockerfile index 01cf5d2..e0b03f4 100644 --- a/LCU.WebApps.Collections.RepoClient/Dockerfile +++ b/LCU.WebApps.Collections.RepoClient/Dockerfile @@ -2,9 +2,22 @@ FROM node:14-bullseye AS build WORKDIR /app -COPY package.json package-lock.json .npmrc ./ +ARG AZURE_DEVOPS_PAT + +COPY package.json package-lock.json ./ RUN npm install -g npm@8.19.4 -RUN npm ci --unsafe-perm --before=2025-09-01 --ignore-scripts +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 . ./