File size: 930 Bytes
86340c8
 
98e57c5
1d1af3f
86340c8
1d1af3f
86340c8
 
 
 
98e57c5
1d1af3f
dbda401
 
86340c8
 
926d2c0
86340c8
98e57c5
 
86340c8
926d2c0
 
86340c8
98e57c5
926d2c0
3a35017
 
3e6741d
86340c8
1d1af3f
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
# Use a modern, slim, and secure version of Node.js based on Debian
FROM node:20-bookworm-slim

# Install trusted SSL certificates, git, and other essential system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    git \
    ffmpeg \
    libwebp-dev \
    && rm -rf /var/lib/apt/lists/*

# Force git to use HTTPS instead of the private SSH protocol
RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/

# Set the working directory
WORKDIR /app

# Copy the dependency list first to leverage Docker's layer caching
COPY package*.json ./

# Install project dependencies
RUN npm install --omit=dev

# Copy the rest of the bot's code into the container
COPY . .

RUN mkdir -p ./session ./downloads ./auth_info_baileys && \
    chmod -R 777 ./session ./downloads ./auth_info_baileys

# The command to run when the container starts
CMD ["npm", "start"]