aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 1b5205bc4dd2c032f491bde80350e73b0f3a041c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# the JRE is required by the openapi-generator-cli
# FROM eclipse-temurin:17-jre-alpine as builder
FROM node:16-alpine AS builder
RUN apk update && \
    apk add openjdk17
WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build -- --configuration production

FROM nginxinc/nginx-unprivileged:alpine-slim
USER nginx

COPY --from=builder --chown=nginx:nginx /usr/src/app/dist/frontend /usr/share/nginx/html

# Overwrite existing entrypoint from base image
ENTRYPOINT []
EXPOSE ${NGINX_PORT}
CMD ["nginx", "-g", "daemon off;"]