1
1
# --- Clone the kubeflow/kubeflow code ---
2
- FROM ubuntu AS fetch-kubeflow-kubeflow
3
-
4
- RUN apt-get update && apt-get install git -y
2
+ FROM alpine/git AS fetch-kubeflow-kubeflow
5
3
6
4
WORKDIR /kf
7
5
COPY ./pkg/ui/v1beta1/frontend/COMMIT ./
@@ -11,7 +9,7 @@ RUN git clone https://github.com/kubeflow/kubeflow.git && \
11
9
git checkout $COMMIT
12
10
13
11
# --- Build the frontend kubeflow library ---
14
- FROM node:16 AS frontend-kubeflow-lib
12
+ FROM node:16-alpine AS frontend-kubeflow-lib
15
13
16
14
WORKDIR /src
17
15
@@ -21,25 +19,27 @@ RUN npm config set fetch-retry-mintimeout 200000 && \
21
19
npm config set fetch-retry-maxtimeout 1200000 && \
22
20
npm config get registry && \
23
21
npm config set registry https://registry.npmjs.org/ && \
24
- npm config get https-proxy && \
25
- npm config rm https-proxy && \
26
- npm ci
22
+ npm config delete https-proxy && \
23
+ npm config set loglevel verbose && \
24
+ npm cache clean --force && \
25
+ npm ci --force --prefer-offline --no-audit
27
26
28
27
COPY --from=fetch-kubeflow-kubeflow $LIB/ ./
29
28
RUN npm run build
30
29
31
30
# --- Build the frontend ---
32
- FROM node:16 AS frontend
31
+ FROM node:16-alpine AS frontend
33
32
34
33
WORKDIR /src
35
34
COPY ./pkg/ui/v1beta1/frontend/package*.json ./
36
- RUN npm config set fetch-retry-mintimeout 20000 && \
37
- npm config set fetch-retry-maxtimeout 120000 && \
35
+ RUN npm config set fetch-retry-mintimeout 200000 && \
36
+ npm config set fetch-retry-maxtimeout 1200000 && \
38
37
npm config get registry && \
39
38
npm config set registry https://registry.npmjs.org/ && \
40
- npm config get https-proxy && \
41
- npm config rm https-proxy && \
42
- npm ci
39
+ npm config delete https-proxy && \
40
+ npm config set loglevel verbose && \
41
+ npm cache clean --force && \
42
+ npm ci --force --prefer-offline --no-audit
43
43
44
44
COPY ./pkg/ui/v1beta1/frontend/ .
45
45
COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/
0 commit comments