Skip to content

Commit 3e736dc

Browse files
authored
[CI] optimize katib ui dockerfile (#2505)
* fix flakiness Signed-off-by: mahdikhashan <[email protected]> * fix flakiness 2 Signed-off-by: mahdikhashan <[email protected]> * fix flakiness 3 Signed-off-by: mahdikhashan <[email protected]> * use alpine for first stage Signed-off-by: mahdikhashan <[email protected]> * use alpline git Signed-off-by: mahdikhashan <[email protected]> * no security audit Signed-off-by: mahdikhashan <[email protected]> * force npm ci Signed-off-by: mahdikhashan <[email protected]> --------- Signed-off-by: mahdikhashan <[email protected]>
1 parent bf03463 commit 3e736dc

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

cmd/ui/v1beta1/Dockerfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# --- 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
53

64
WORKDIR /kf
75
COPY ./pkg/ui/v1beta1/frontend/COMMIT ./
@@ -11,7 +9,7 @@ RUN git clone https://github.com/kubeflow/kubeflow.git && \
119
git checkout $COMMIT
1210

1311
# --- Build the frontend kubeflow library ---
14-
FROM node:16 AS frontend-kubeflow-lib
12+
FROM node:16-alpine AS frontend-kubeflow-lib
1513

1614
WORKDIR /src
1715

@@ -21,25 +19,27 @@ RUN npm config set fetch-retry-mintimeout 200000 && \
2119
npm config set fetch-retry-maxtimeout 1200000 && \
2220
npm config get registry && \
2321
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
2726

2827
COPY --from=fetch-kubeflow-kubeflow $LIB/ ./
2928
RUN npm run build
3029

3130
# --- Build the frontend ---
32-
FROM node:16 AS frontend
31+
FROM node:16-alpine AS frontend
3332

3433
WORKDIR /src
3534
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 && \
3837
npm config get registry && \
3938
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
4343

4444
COPY ./pkg/ui/v1beta1/frontend/ .
4545
COPY --from=frontend-kubeflow-lib /src/dist/kubeflow/ ./node_modules/kubeflow/

0 commit comments

Comments
 (0)