Neon-AI commited on
Commit
2e91c24
·
verified ·
1 Parent(s): 000b079

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM node:20-slim
2
 
3
  # 1️⃣ Install git, curl, and certificates
@@ -9,7 +10,8 @@ RUN apt-get update && \
9
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
10
  | tar -xz -C /tmp && \
11
  mv /tmp/git-lfs-3.4.0/git-lfs /usr/local/bin/git-lfs && \
12
- chmod +x /usr/local/bin/git-lfs && git lfs install
 
13
 
14
  WORKDIR /app
15
 
@@ -19,16 +21,18 @@ RUN --mount=type=secret,id=GH_TOKEN \
19
 
20
  WORKDIR /app/temp
21
 
22
- # 4️⃣ Pull the real binary using LFS
23
  RUN git lfs pull
24
 
25
- # 5️⃣ Check files before moving
26
- RUN ls -l
27
 
28
- # 6️⃣ Move binary to /usr/local/bin and app files to /app
 
29
  RUN mv telegram-bot-api /usr/local/bin/telegram-bot-api && \
30
  chmod +x /usr/local/bin/telegram-bot-api && \
31
- mv server.js package.json start.sh /app/ && \
 
32
  chmod +x /app/start.sh && \
33
  rm -rf /app/temp
34
 
 
1
+ # syntax=docker/dockerfile:1.6
2
  FROM node:20-slim
3
 
4
  # 1️⃣ Install git, curl, and certificates
 
10
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
11
  | tar -xz -C /tmp && \
12
  mv /tmp/git-lfs-3.4.0/git-lfs /usr/local/bin/git-lfs && \
13
+ chmod +x /usr/local/bin/git-lfs && \
14
+ git lfs install
15
 
16
  WORKDIR /app
17
 
 
21
 
22
  WORKDIR /app/temp
23
 
24
+ # 4️⃣ Pull the real binary using Git LFS
25
  RUN git lfs pull
26
 
27
+ # 5️⃣ Verify files
28
+ RUN ls -lh
29
 
30
+ # 6️⃣ Move binary and app files
31
+ # Adjust start.sh path if inside scripts/ folder
32
  RUN mv telegram-bot-api /usr/local/bin/telegram-bot-api && \
33
  chmod +x /usr/local/bin/telegram-bot-api && \
34
+ mv server.js package.json start.sh /app/ 2>/dev/null || \
35
+ mv server.js package.json scripts/start.sh /app/start.sh && \
36
  chmod +x /app/start.sh && \
37
  rm -rf /app/temp
38