-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (41 loc) · 953 Bytes
/
Copy pathDockerfile
File metadata and controls
46 lines (41 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Pilih base image
FROM node:20-bullseye
# Install dependensi yang dibutuhkan untuk Puppeteer dan Node.js
RUN apt-get update && apt-get install -y \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2 \
libdrm2 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libasound2 \
libpangocairo-1.0-0 \
libpango-1.0-0 \
libx11-xcb1 \
libxcb1 \
libxext6 \
libxfixes3 \
libnss3 \
libx11-6 \
libxrender1 \
libjpeg62-turbo \
libgtk-3-0 \
fonts-liberation \
libappindicator3-1 \
lsb-release \
xdg-utils \
wget \
ca-certificates \
--no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Tentukan direktori kerja di dalam container
WORKDIR /home/container
# Salin seluruh file proyek ke dalam container
COPY . .
# Install dependensi Node.js
RUN npm install
# Tentukan perintah default untuk menjalankan container
CMD ["npm", "start"]