Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
# Set working directory
|
4 |
WORKDIR /code
|
5 |
|
6 |
-
# Copy
|
7 |
-
COPY ./
|
8 |
-
|
9 |
-
COPY ./package-lock.json /code/package-lock.json
|
10 |
|
11 |
-
#
|
12 |
-
|
13 |
|
14 |
# Expose port
|
15 |
EXPOSE 7860
|
|
|
1 |
+
# Use a specific version of the node image
|
2 |
+
FROM node:16-alpine
|
3 |
|
4 |
# Set working directory
|
5 |
WORKDIR /code
|
6 |
|
7 |
+
# Copy package.json and package-lock.json and install dependencies
|
8 |
+
COPY package*.json ./
|
9 |
+
RUN npm install --production
|
|
|
10 |
|
11 |
+
# Copy the rest of the application files
|
12 |
+
COPY . .
|
13 |
|
14 |
# Expose port
|
15 |
EXPOSE 7860
|