Spaces:
Paused
Paused
Update Dockerfile
#1
by keungliang - opened
- Dockerfile +2 -23
Dockerfile
CHANGED
|
@@ -3,32 +3,11 @@ FROM debian:bullseye-slim
|
|
| 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 |
-
|
| 21 |
-
RUN echo '#!/bin/bash\n\
|
| 22 |
-
for i in {0..9};\n\
|
| 23 |
-
do\n\
|
| 24 |
-
port=$((9050 + i))\n\
|
| 25 |
-
mkdir -p /tmp/tor/$i\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 ["/
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 6 |
haproxy \
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY haproxy.cfg /etc/haproxy/haproxy.cfg
|
| 10 |
|
| 11 |
+
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
CMD ["haproxy", "-f", "/etc/haproxy/haproxy.cfg", "-db"]
|