Neon-AI commited on
Commit
bc9dbbb
·
verified ·
1 Parent(s): 96c4e53

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -2,25 +2,28 @@
2
  FROM node:20-slim
3
 
4
  # ---------------------------
5
- # 1️⃣ Install git, curl, and dependencies for Git LFS
6
  # ---------------------------
7
  RUN apt-get update && \
8
  apt-get install -y git curl ca-certificates && \
9
  rm -rf /var/lib/apt/lists/*
10
 
11
  # ---------------------------
12
- # 2️⃣ Install Git LFS manually (avoids gnupg issue in slim image)
13
  # ---------------------------
14
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
15
- | tar -xz -C /usr/local && /usr/local/git-lfs install
 
 
 
16
 
17
  # ---------------------------
18
- # 3️⃣ Set working directory for app
19
  # ---------------------------
20
  WORKDIR /app
21
 
22
  # ---------------------------
23
- # 4️⃣ Clone private GitHub repo using HF Space secret
24
  # ---------------------------
25
  RUN --mount=type=secret,id=GH_TOKEN \
26
  git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git temp
@@ -28,7 +31,7 @@ RUN --mount=type=secret,id=GH_TOKEN \
28
  WORKDIR /app/temp
29
 
30
  # ---------------------------
31
- # 5️⃣ Pull LFS files (ensures the real binary is downloaded)
32
  # ---------------------------
33
  RUN git lfs pull
34
 
 
2
  FROM node:20-slim
3
 
4
  # ---------------------------
5
+ # 1️⃣ Install git, curl, ca-certificates
6
  # ---------------------------
7
  RUN apt-get update && \
8
  apt-get install -y git curl ca-certificates && \
9
  rm -rf /var/lib/apt/lists/*
10
 
11
  # ---------------------------
12
+ # 2️⃣ Install Git LFS manually (works in slim image)
13
  # ---------------------------
14
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
15
+ | tar -xz -C /tmp && \
16
+ mv /tmp/git-lfs-3.4.0/git-lfs /usr/local/bin/ && \
17
+ chmod +x /usr/local/bin/git-lfs && \
18
+ git lfs install
19
 
20
  # ---------------------------
21
+ # 3️⃣ Set working directory
22
  # ---------------------------
23
  WORKDIR /app
24
 
25
  # ---------------------------
26
+ # 4️⃣ Clone private GitHub repo via HF Space secret
27
  # ---------------------------
28
  RUN --mount=type=secret,id=GH_TOKEN \
29
  git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git temp
 
31
  WORKDIR /app/temp
32
 
33
  # ---------------------------
34
+ # 5️⃣ Pull LFS files (real binary)
35
  # ---------------------------
36
  RUN git lfs pull
37