MB-IDK commited on
Commit
efc2d9c
·
verified ·
1 Parent(s): ef9a2be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -11
Dockerfile CHANGED
@@ -1,24 +1,23 @@
1
- FROM debian:bullseye-slim [cite: 1]
2
 
3
- ENV DEBIAN_FRONTEND=noninteractive [cite: 1]
4
 
5
  RUN apt-get update && apt-get install -y \
6
  tor \
7
  haproxy \
8
  privoxy \
9
  procps \
10
- && rm -rf /var/lib/apt/lists/*
11
 
12
- # Création du dossier pour Tor
13
- RUN mkdir -p /tmp/tor && chown -R 1000:1000 /tmp/tor && chmod -R 777 /tmp/tor
14
 
15
- # Configuration de Privoxy pour écouter sur 7860 et envoyer vers HAProxy (8888)
16
- RUN echo "listen-address 0.0.0.0:7860\ntoggle 1\nenable-remote-toggle 0\nenable-remote-http-toggle 0\nenable-edit-actions 0\nenforce-blocks 0\nbuffer-limit 4096\nforward-socks5t / 127.0.0.1:8888 ." > /etc/privoxy/config [cite: 1, 2]
17
 
18
- # On copie ton fichier haproxy.cfg personnalisé au lieu de le générer par un "echo"
19
  COPY haproxy.cfg /etc/haproxy/haproxy.cfg
20
 
21
- # Script de démarrage corrigé pour 10 instances Tor
22
  RUN echo '#!/bin/bash\n\
23
  for i in {0..9};\n\
24
  do\n\
@@ -27,9 +26,9 @@ do\n\
27
  tor --SocksPort $port --DataDirectory /tmp/tor/$i --RunAsDaemon 1\n\
28
  done\n\
29
  haproxy -f /etc/haproxy/haproxy.cfg -D\n\
30
- privoxy --no-daemon /etc/privoxy/config' > /entrypoint.sh && chmod +x /entrypoint.sh
31
 
32
  USER 1000
33
- EXPOSE 7860 7861 [cite: 3, 4]
34
 
35
  CMD ["/entrypoint.sh"]
 
1
+ FROM debian:bullseye-slim
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  RUN apt-get update && apt-get install -y \
6
  tor \
7
  haproxy \
8
  privoxy \
9
  procps \
10
+ && rm -rf /var/lib/apt/lists/*
11
 
12
+ RUN mkdir -p /tmp/tor && chown -R 1000:1000 /tmp/tor && chmod -R 777 /tmp/tor
 
13
 
14
+ # Configuration de Privoxy (Port 7860 vers HAProxy 8888)
15
+ RUN echo "listen-address 0.0.0.0:7860\ntoggle 1\nenable-remote-toggle 0\nenable-remote-http-toggle 0\nenable-edit-actions 0\nenforce-blocks 0\nbuffer-limit 4096\nforward-socks5t / 127.0.0.1:8888 ." > /etc/privoxy/config
16
 
17
+ # On utilise ton fichier haproxy.cfg externe
18
  COPY haproxy.cfg /etc/haproxy/haproxy.cfg
19
 
20
+ # Script d'entrée pour lancer les 10 instances Tor (9050-9059)
21
  RUN echo '#!/bin/bash\n\
22
  for i in {0..9};\n\
23
  do\n\
 
26
  tor --SocksPort $port --DataDirectory /tmp/tor/$i --RunAsDaemon 1\n\
27
  done\n\
28
  haproxy -f /etc/haproxy/haproxy.cfg -D\n\
29
+ privoxy --no-daemon /etc/privoxy/config' > /entrypoint.sh && chmod +x /entrypoint.sh
30
 
31
  USER 1000
32
+ EXPOSE 7860 7861
33
 
34
  CMD ["/entrypoint.sh"]