Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +9 -0
Dockerfile
CHANGED
|
@@ -4,6 +4,15 @@ FROM node:18-alpine
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Build the application
|
| 8 |
RUN npm run build
|
| 9 |
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy package.json and package-lock.json to the working directory
|
| 8 |
+
COPY package.json package-lock.json ./
|
| 9 |
+
|
| 10 |
+
# Install the application dependencies
|
| 11 |
+
RUN npm install
|
| 12 |
+
|
| 13 |
+
# Copy the rest of the application to the working directory
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
# Build the application
|
| 17 |
RUN npm run build
|
| 18 |
|