-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
46 lines (26 loc) · 911 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:20 AS base
FROM base as test
WORKDIR /app
COPY package*.json ./
RUN npm ci && npm install -g @angular/cli@18.1.4
RUN apt-get update && apt-get install -y \
wget \
gnupg2 \
&& wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV CHROME_BIN="/usr/bin/google-chrome"
COPY . .
RUN ng lint
RUN ng test --watch=false --browsers=ChromeHeadlessNoSandbox
FROM base as build
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build --configuration=production
FROM nginx:latest
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist/data-analysis/browser/ /usr/share/nginx/html/