understanding commited on
Commit
fd92ae4
·
verified ·
1 Parent(s): d6b3a8c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Node.js 20 Alpine as the base image for a lightweight container
2
+ FROM node:20-alpine
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Install git (required for cloning the repository) and clean npm cache
8
+ RUN apk add --no-cache git && \
9
+ npm cache clean --force && \
10
+ npm install -g [email protected]
11
+
12
+ # Clone the repository directly into the working directory
13
+ RUN git clone https://github.com/testingol/ckptw-wabot .git . && \
14
+ npm install --omit=dev
15
+
16
+ # Create necessary directories and set permissions
17
+ RUN mkdir -p ./session ./downloads ./state && \
18
+ chmod -R 777 ./session ./downloads ./state
19
+
20
+ # Copy any local custom files (if applicable, e.g., your bot code)
21
+ # Uncomment this line if you have local modifications to include
22
+ # COPY . .
23
+
24
+ # Expose any necessary ports (optional, adjust if your bot uses a specific port)
25
+ # EXPOSE 3000
26
+
27
+ # Define the command to start the application
28
+ CMD ["npm", "start"]