Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:latest
|
2 |
+
RUN apt-get update && apt-get install -y \
|
3 |
+
curl \
|
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/2ch/colab/resolve/main/telegram-bot-api
|
10 |
+
|
11 |
+
RUN chmod +x /bot-data/telegram-bot-api
|
12 |
+
|
13 |
+
WORKDIR /bot-data
|
14 |
+
|
15 |
+
RUN chmod 777 /bot-data
|
16 |
+
|
17 |
+
RUN echo 'while true; do { echo -e "HTTP/1.1 200 OK\n\nHello World!" | nc -l -p 7860; } done' > /bot-data/hello-world.sh
|
18 |
+
|
19 |
+
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
|