fix(build): Added npm build in dockerfile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,3 +1,10 @@
|
||||
FROM node:14.0-slim AS appjs-builder
|
||||
WORKDIR /app
|
||||
COPY app/package.json app/package-lock.json ./
|
||||
RUN npm install
|
||||
COPY app .
|
||||
RUN npm run build
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /
|
||||
@@ -23,6 +30,9 @@ WORKDIR /
|
||||
# copy pre-built packages to this image
|
||||
COPY --from=0 /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
|
||||
|
||||
# Copy the built JS files from the appjs-builder stage
|
||||
COPY --from=appjs-builder /app/static/build /kube_ops_view/static/build
|
||||
|
||||
# now copy the actual code we will execute (poetry install above was just for dependencies)
|
||||
COPY kube_ops_view /kube_ops_view
|
||||
|
||||
|
||||
Reference in New Issue
Block a user