Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -3
Dockerfile
CHANGED
|
@@ -7,14 +7,14 @@ RUN apk add --no-cache openjdk11
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /code
|
| 9 |
|
| 10 |
-
|
| 11 |
COPY package*.json ./
|
| 12 |
RUN npm install --production
|
| 13 |
|
| 14 |
# Copy the rest of the application files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
-
# Create a directory for temporary files
|
| 18 |
RUN mkdir -p /code/temp && \
|
| 19 |
chmod 777 /code/temp
|
| 20 |
|
|
@@ -26,4 +26,3 @@ USER node
|
|
| 26 |
|
| 27 |
# Start Node.js application
|
| 28 |
CMD ["node", "index.js"]
|
| 29 |
-
|
|
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /code
|
| 9 |
|
| 10 |
+
# Copy package.json and package-lock.json and install dependencies
|
| 11 |
COPY package*.json ./
|
| 12 |
RUN npm install --production
|
| 13 |
|
| 14 |
# Copy the rest of the application files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Create a directory for temporary Java files
|
| 18 |
RUN mkdir -p /code/temp && \
|
| 19 |
chmod 777 /code/temp
|
| 20 |
|
|
|
|
| 26 |
|
| 27 |
# Start Node.js application
|
| 28 |
CMD ["node", "index.js"]
|
|
|