Commit ·
7a0df5b
1
Parent(s): 0468a4b
Update
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -4,11 +4,14 @@ FROM node:20-alpine
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Copy the rest of the application
|
| 14 |
COPY . .
|
|
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Update npm to latest version to avoid the "Exit handler never called" error
|
| 8 |
+
RUN npm install -g npm@latest
|
| 9 |
|
| 10 |
+
# Copy package.json only (not package-lock.json)
|
| 11 |
+
COPY package.json ./
|
| 12 |
+
|
| 13 |
+
# Clear npm cache and install dependencies fresh
|
| 14 |
+
RUN npm cache clean --force && npm install --no-package-lock
|
| 15 |
|
| 16 |
# Copy the rest of the application
|
| 17 |
COPY . .
|