Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
FROM node:14-bullseye-slim as build-step
|
3 |
WORKDIR /app
|
4 |
ENV PATH /app/node_modules/.bin:$PATH
|
5 |
-
|
|
|
6 |
COPY ./frontend/package.json ./frontend/package-lock.json ./frontend/
|
7 |
WORKDIR /app/frontend
|
8 |
RUN npm install -g [email protected]
|
9 |
RUN npm install
|
10 |
|
11 |
-
|
12 |
COPY ./frontend ./frontend
|
13 |
-
|
14 |
WORKDIR /app/frontend
|
15 |
RUN npm run build
|
16 |
|
|
|
2 |
FROM node:14-bullseye-slim as build-step
|
3 |
WORKDIR /app
|
4 |
ENV PATH /app/node_modules/.bin:$PATH
|
5 |
+
|
6 |
+
# Copy package.json and package-lock.json first to leverage Docker cache
|
7 |
COPY ./frontend/package.json ./frontend/package-lock.json ./frontend/
|
8 |
WORKDIR /app/frontend
|
9 |
RUN npm install -g [email protected]
|
10 |
RUN npm install
|
11 |
|
12 |
+
# Copy the rest of the frontend code and build the project
|
13 |
COPY ./frontend ./frontend
|
|
|
14 |
WORKDIR /app/frontend
|
15 |
RUN npm run build
|
16 |
|