Update Dockerfile
Browse files- Dockerfile +24 -26
Dockerfile
CHANGED
|
@@ -1,28 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
ffmpeg \
|
| 9 |
-
imagemagick \
|
| 10 |
-
libnss3-dev \
|
| 11 |
-
webp && \
|
| 12 |
-
apt-get clean
|
| 13 |
-
RUN apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
|
| 14 |
-
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
|
| 15 |
-
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
|
| 16 |
-
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
|
| 17 |
-
ca-certificates libappindicator1 libnss3 lsb-release xdg-utils
|
| 18 |
-
RUN apt-get install -y \
|
| 19 |
-
fonts-liberation \
|
| 20 |
-
fonts-dejavu \
|
| 21 |
-
fonts-noto-color-emoji \
|
| 22 |
-
libfontconfig1 --no-install-recommends
|
| 23 |
WORKDIR /app
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
COPY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gunakan image Node.js yang mendukung Playwright
|
| 2 |
+
FROM mcr.microsoft.com/playwright:focal
|
| 3 |
+
|
| 4 |
+
# Set environment variable untuk menghindari dialog pada Playwright
|
| 5 |
+
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD 1
|
| 6 |
+
|
| 7 |
+
# Tentukan work directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
# Copy file package.json dan package-lock.json
|
| 11 |
+
COPY package*.json ./
|
| 12 |
+
|
| 13 |
+
# Install dependencies
|
| 14 |
+
RUN npm install
|
| 15 |
+
|
| 16 |
+
# Copy semua file ke container
|
| 17 |
+
COPY . .
|
| 18 |
+
|
| 19 |
+
# Install Playwright dependencies dan browser binaries
|
| 20 |
+
RUN npx playwright install --with-deps
|
| 21 |
+
|
| 22 |
+
# Expose port untuk aplikasi
|
| 23 |
EXPOSE 7860
|
| 24 |
+
|
| 25 |
+
# Start aplikasi
|
| 26 |
+
CMD ["npm", "start"]
|