Skip to content

Commit 47d4d8f

Browse files
andreyvelichk8s-ci-robot
authored andcommitted
Add npm build to the UI Dockerfile (#665)
* Remove build from the Repo * npm build in dockerfile * Remove no-cache * Change size
1 parent c81818d commit 47d4d8f

File tree

14 files changed

+14
-97
lines changed

14 files changed

+14
-97
lines changed

cmd/ui/v1alpha2/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
FROM golang:alpine AS build-env
1+
FROM node:10.16.0-jessie AS npm-build
2+
3+
ADD /pkg/ui/v1alpha2/frontend /frontend
4+
RUN cd /frontend && npm install
5+
RUN cd /frontend && npm run build
6+
RUN rm -rf /frontend/node_modules
7+
8+
FROM golang:alpine AS go-build
29
# The GOPATH in the image is /go.
310
ADD . /go/src/github.com/kubeflow/katib
411
WORKDIR /go/src/github.com/kubeflow/katib/cmd/ui
@@ -7,7 +14,7 @@ RUN go build -o katib-ui ./v1alpha2
714
FROM alpine:3.7
815
WORKDIR /app
916
# v1alpha2 source code
10-
COPY --from=build-env /go/src/github.com/kubeflow/katib/cmd/ui/katib-ui /app/
11-
COPY --from=build-env /go/src/github.com/kubeflow/katib/pkg/ui/v1alpha2/frontend/build/ /app/build
17+
COPY --from=go-build /go/src/github.com/kubeflow/katib/cmd/ui/katib-ui /app/
18+
COPY --from=npm-build /frontend/build /app/build
1219

1320
ENTRYPOINT ["./katib-ui"]

pkg/ui/v1alpha2/frontend/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ yarn-error.log*
2222

2323
# package-lock
2424
package-lock.json
25+
26+
# build
27+
/build

pkg/ui/v1alpha2/frontend/build/asset-manifest.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
-3.78 KB
Binary file not shown.

pkg/ui/v1alpha2/frontend/build/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.
-79.3 KB
Binary file not shown.

pkg/ui/v1alpha2/frontend/build/manifest.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

pkg/ui/v1alpha2/frontend/build/precache-manifest.e1ab7686cdd1ee6186be7633c1c70252.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

pkg/ui/v1alpha2/frontend/build/service-worker.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

pkg/ui/v1alpha2/frontend/build/static/css/2.3e32d45a.chunk.css

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)