OpenSlides/client/docker/Dockerfile

24 lines
489 B
Docker
Raw Normal View History

FROM node:13 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@^9
RUN ng config -g cli.warnings.versionMismatch false
USER openslides
COPY package.json .
RUN npm install
COPY browserslist *.json ./
COPY src ./src
RUN npm run build
COPY client-version.txt static/
FROM nginx
COPY --from=nodejs /build/app/static /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/nginx.conf