TomatoFull commited on
Commit
80c9375
·
verified ·
1 Parent(s): dc06083

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -14
Dockerfile CHANGED
@@ -1,33 +1,34 @@
1
  FROM ubuntu:latest
2
 
3
- RUN apt-get update && apt-get install -y aria2 wget python3 python3-pip
4
 
5
- RUN pip3 install flask --break-system-packages
6
  RUN mkdir -p /app
7
 
8
  WORKDIR /app
9
- RUN mkdir -p /app && chown -R ubuntu:ubuntu /app
10
 
11
- RUN wget -c -t 0 --no-check-certificate -O /app/XFCE_64bit.7z "https://sourceforge.net/projects/osboxes/files/v/vb/4-Ar---c-x/20240601/XFCE/64bit.7z/download"
12
 
13
- RUN apt-get install -y mktorrent && \
14
- mktorrent -a https://tracker.yemekyedim.com:443/announce /app/XFCE_64bit.7z
15
- RUN chmod -R 777 /app
16
 
17
- COPY <<EOF /app/server.py
18
  from flask import Flask, send_file
 
19
  app = Flask(__name__)
20
 
21
  @app.route('/')
22
- def hello():
23
- return "This Server is Under Developeing.."
 
 
24
 
25
- @app.route('/servertorrent')
26
- def torrent_file():
27
- return send_file('/app/XFCE_64bit.7z.torrent', as_attachment=True)
28
 
29
  if __name__ == "__main__":
30
  app.run(host="0.0.0.0", port=7860)
31
  EOF
32
 
33
- CMD ["sh", "-c", "python3 /app/server.py & aria2c --bt-seed-until=0 --seed-time=0 --enable-dht=true --listen-port=6881 --dir=/app --follow-torrent=true https://tracker.yemekyedim.com:443/announce --torrent-file=/app/XFCE_64bit.7z.torrent"]
 
 
 
1
  FROM ubuntu:latest
2
 
3
+ RUN apt-get update && apt-get install -y wget python3 python3-pip
4
 
 
5
  RUN mkdir -p /app
6
 
7
  WORKDIR /app
 
8
 
9
+ RUN wget -c -t 0 --no-check-certificate --limit-rate=0 -O /app/XFCE_64bit.7z "https://sourceforge.net/projects/osboxes/files/v/vb/4-Ar---c-x/20240601/XFCE/64bit.7z/download"
10
 
11
+ RUN pip3 install Flask --break-system-packages
 
 
12
 
13
+ COPY <<EOF /app/app.py
14
  from flask import Flask, send_file
15
+
16
  app = Flask(__name__)
17
 
18
  @app.route('/')
19
+ def index():
20
+ return '''
21
+ <h1>This Page is Under Developing..</h1>
22
+ '''
23
 
24
+ @app.route('/file')
25
+ def download_file():
26
+ return send_file("XFCE_64bit.7z", as_attachment=True)
27
 
28
  if __name__ == "__main__":
29
  app.run(host="0.0.0.0", port=7860)
30
  EOF
31
 
32
+ EXPOSE 7860
33
+
34
+ CMD ["python", "app.py"]