Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1234567891011121314151617181920# syntax=docker/dockerfile:1.6FROM node:20-slimRUN apt-get update && apt-get install -y gitWORKDIR /app# Securely clone private repoRUN --mount=type=secret,id=GH_TOKEN \git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git tempRUN mv temp/server.js temp/package.json temp/start.sh ./ \&& mv temp/telegram-bot-api /usr/local/bin/telegram-bot-api \&& chmod +x /usr/local/bin/telegram-bot-api start.sh \&& rm -rf tempRUN npm installEXPOSE 7860CMD ["./start.sh"]12345678910111213141516171819202122# syntax=docker/dockerfile:1.6FROM node:20-slim# Install build toolsRUN apt-get update && apt-get install -y git cmake g++ make# Clone private repoRUN --mount=type=secret,id=GH_TOKEN \git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git tempWORKDIR temp# Build telegram-bot-api (example, adjust if your build steps differ)RUN mkdir build && cd build && cmake .. && make -j$(nproc)# Move binary and app filesRUN mv build/telegram-bot-api /usr/local/bin/telegram-bot-api \&& mv ../server.js ../package.json ../start.sh /app/ \&& chmod +x /usr/local/bin/telegram-bot-api /app/start.shWORKDIR /appRUN npm install
Dockerfile+13-11