29 lines
974 B
Docker
29 lines
974 B
Docker
FROM node:14-bullseye-slim AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
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
|
|
|
|
RUN npm ci --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;"]
|