Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Use a more recent Node.js image
|
2 |
-
FROM node:20
|
3 |
|
4 |
# Install necessary libraries and dependencies for Puppeteer
|
5 |
RUN apt-get update && apt-get install -y \
|
@@ -20,11 +20,14 @@ RUN apt-get update && apt-get install -y \
|
|
20 |
libdbus-1-3 \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
|
|
|
|
|
|
23 |
# Clean npm cache
|
24 |
RUN npm cache clean --force
|
25 |
|
26 |
# Install Puppeteer
|
27 |
-
RUN npm install puppeteer
|
28 |
|
29 |
# Set up your working directory
|
30 |
WORKDIR /app
|
@@ -32,5 +35,8 @@ WORKDIR /app
|
|
32 |
# Copy your application files into the Docker image
|
33 |
COPY . /app
|
34 |
|
|
|
|
|
|
|
35 |
# Set the command to run your application
|
36 |
CMD ["node", "app.js"]
|
|
|
1 |
# Use a more recent Node.js image
|
2 |
+
FROM node:20
|
3 |
|
4 |
# Install necessary libraries and dependencies for Puppeteer
|
5 |
RUN apt-get update && apt-get install -y \
|
|
|
20 |
libdbus-1-3 \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
23 |
+
# Update npm to the latest version
|
24 |
+
RUN npm install -g npm@latest
|
25 |
+
|
26 |
# Clean npm cache
|
27 |
RUN npm cache clean --force
|
28 |
|
29 |
# Install Puppeteer
|
30 |
+
RUN npm install puppeteer --no-optional
|
31 |
|
32 |
# Set up your working directory
|
33 |
WORKDIR /app
|
|
|
35 |
# Copy your application files into the Docker image
|
36 |
COPY . /app
|
37 |
|
38 |
+
# Install additional dependencies if needed
|
39 |
+
RUN npm install
|
40 |
+
|
41 |
# Set the command to run your application
|
42 |
CMD ["node", "app.js"]
|