Create Dockerfile
Browse files- Dockerfile +35 -0
Dockerfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Node.js runtime as the base image
|
| 2 |
+
FROM node:18
|
| 3 |
+
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install Express and Puppeteer globally
|
| 8 |
+
RUN npm install -g express puppeteer
|
| 9 |
+
|
| 10 |
+
# Install additional Puppeteer dependencies (for headless Chromium)
|
| 11 |
+
RUN apt-get update && apt-get install -y \
|
| 12 |
+
wget \
|
| 13 |
+
ca-certificates \
|
| 14 |
+
fonts-liberation \
|
| 15 |
+
libappindicator3-1 \
|
| 16 |
+
libasound2 \
|
| 17 |
+
libatk1.0-0 \
|
| 18 |
+
libcups2 \
|
| 19 |
+
libdbus-1-3 \
|
| 20 |
+
libxcomposite1 \
|
| 21 |
+
libxdamage1 \
|
| 22 |
+
libxrandr2 \
|
| 23 |
+
libxss1 \
|
| 24 |
+
libxtst6 \
|
| 25 |
+
--no-install-recommends \
|
| 26 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 27 |
+
|
| 28 |
+
# Copy the project files
|
| 29 |
+
COPY . .
|
| 30 |
+
|
| 31 |
+
# Expose the API port
|
| 32 |
+
EXPOSE 7860
|
| 33 |
+
|
| 34 |
+
# Start the server
|
| 35 |
+
CMD ["node", "server.js"]
|