OpenSlides/client/docker/Dockerfile
Sean 98e4f05b90 Update dockerfiles for node 16 and a12
adjust the productive dockerfiles to work with angular12 and use node16
2021-07-16 11:21:29 +02:00

25 lines
550 B
Docker

FROM node:16 AS nodejs
RUN mkdir -p /build/app
WORKDIR /build/app
RUN useradd -m openslides
RUN chown -R openslides /build/app
USER root
RUN npm install -g @angular/cli@^12
RUN ng config -g cli.warnings.versionMismatch false
USER openslides
COPY package.json package-lock.json ./
RUN npm -v
RUN npm ci
COPY .browserslistrc *.json ./
COPY src ./src
RUN npm run build-to-dir /build/app/static
COPY docker/client-version.txt static/
FROM nginx
COPY --from=nodejs /build/app/static /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/nginx.conf