anon4ik commited on
Commit
dfdee8c
·
verified ·
1 Parent(s): bfa12af

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -4,9 +4,14 @@ RUN apt-get update && apt-get install -y \
4
  netcat \
5
  && rm -rf /var/lib/apt/lists/*
6
 
 
 
 
 
 
7
  RUN mkdir /bot-data
8
 
9
- RUN curl -L -o /bot-data/telegram-bot-api https://huggingface.co/anon4ik/t_api/resolve/main/telegram-bot-api
10
 
11
  RUN chmod +x /bot-data/telegram-bot-api
12
 
@@ -20,4 +25,4 @@ RUN chmod +x /bot-data/hello-world.sh
20
 
21
  EXPOSE 7860 8081
22
 
23
- CMD ./telegram-bot-api --verbosity=0 --local --api-id=12345678 --api-hash=1a2b3c4d5e6f7g8h9i0jklmnopqrstuvwx --temp-dir=/bot-data --dir=/bot-data & ./hello-world.sh
 
4
  netcat \
5
  && rm -rf /var/lib/apt/lists/*
6
 
7
+ RUN --mount=type=secret,id=URL,mode=0444,required=true \
8
+ --mount=type=secret,id=FILE_NAME,mode=0444,required=true \
9
+ --mount=type=secret,id=ApiID,mode=0444,required=true \
10
+ --mount=type=secret,id=ApiHash,mode=0444,required=true \
11
+
12
  RUN mkdir /bot-data
13
 
14
+ RUN curl -L -o /bot-data/$(cat /run/secrets/FILE_NAME) $(cat /run/secrets/URL)
15
 
16
  RUN chmod +x /bot-data/telegram-bot-api
17
 
 
25
 
26
  EXPOSE 7860 8081
27
 
28
+ CMD ./telegram-bot-api --verbosity=0 --local --api-id=$ApiID --api-hash=$ApiHash --temp-dir=/bot-data --dir=/bot-data & ./hello-world.sh