Update Dockerfile
Browse files- 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
|
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
|
|
|
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
|