Files
monorepo/LCU.WebApps.Collections.RepoClient/Dockerfile
T
2026-03-25 15:19:29 +00:00

35 lines
1.4 KiB
Docker

FROM node:14-bullseye-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install -g npm@9
RUN npm pkg delete dependencies.node
ARG PAT=vvqu3q252m5kqwptu4tavha4ghk4svhmwsahb2kvlu22ogiegt6q
RUN TOKEN="$(printf "%s" "${PAT}" | base64 | tr -d '\n')" && \
printf "registry=https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/\n" > .npmrc && \
printf "always-auth=true\n" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:username=azdo\n" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:_password=%s\n" "${TOKEN}" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/registry/:[email protected]\n" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:username=azdo\n" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:_password=%s\n" "${TOKEN}" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:[email protected]\n" >> .npmrc
RUN npm install --unsafe-perm
COPY . ./
RUN npm run build
FROM nginx:1.27-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;"]