Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
|
@@ -1,24 +1,26 @@
|
|
| 1 |
-
# Use
|
| 2 |
FROM node:16
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
RUN curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o google-chrome.deb
|
| 10 |
-
RUN dpkg -i google-chrome.deb || apt-get install -f -y
|
| 11 |
-
RUN rm google-chrome.deb
|
| 12 |
|
| 13 |
-
# Install dependencies
|
| 14 |
-
COPY package.json ./
|
| 15 |
RUN npm install
|
| 16 |
|
| 17 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
# Expose the port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
-
#
|
| 24 |
CMD ["node", "server.js"]
|
|
|
|
| 1 |
+
# Use a Node.js base image
|
| 2 |
FROM node:16
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy package.json and package-lock.json
|
| 8 |
+
COPY package*.json ./
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# Install dependencies (including reikeranidl and other required packages)
|
|
|
|
| 11 |
RUN npm install
|
| 12 |
|
| 13 |
+
# Install Chromium
|
| 14 |
+
RUN npx install chromium
|
| 15 |
+
|
| 16 |
+
# Log the path of the installed Chromium
|
| 17 |
+
RUN echo "Chromium path: $(npm explore chromium -- npm bin)"
|
| 18 |
+
|
| 19 |
+
# Copy the rest of the application
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
# Expose the port
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
+
# Command to run the app
|
| 26 |
CMD ["node", "server.js"]
|