mirror of
https://github.com/fphammerle/docker-tor-proxy.git
synced 2025-10-27 02:43:35 +01:00
40b88ec7d5
https://gitweb.torproject.org/tor.git/plain/ChangeLog https://git.alpinelinux.org/aports/commit/community/tor?id=d181b0289ff7c32d371dcd976276672bbe2e7b72 https://git.alpinelinux.org/aports/commit/community/tor?id=9a0a0a5045901ab97ef455b54ffe19c91ca6993e https://git.alpinelinux.org/aports/commit/community/tor?id=5edd132382384956e1787d4dcd5f1ffa9c520571 https://git.alpinelinux.org/aports/commit/community/tor?id=4ecb636d72d13db0f95f6e840e755bb260c91165
30 lines
823 B
Docker
30 lines
823 B
Docker
FROM alpine:3.13.0
|
|
|
|
ARG TOR_PACKAGE_VERSION=0.4.4.6-r1
|
|
RUN apk add --no-cache tor=$TOR_PACKAGE_VERSION
|
|
VOLUME /var/lib/tor
|
|
|
|
#RUN apk add --no-cache \
|
|
# less \
|
|
# man-db \
|
|
# tor-doc=$TOR_PACKAGE_VERSION
|
|
#ENV PAGER=less
|
|
|
|
EXPOSE 9050/tcp
|
|
EXPOSE 9053/udp
|
|
COPY torrc.template entrypoint.sh /
|
|
RUN chmod -c a+rX /torrc.template /entrypoint.sh
|
|
ENV SOCKS_TIMEOUT_SECONDS=
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
USER tor
|
|
CMD ["tor", "-f", "/tmp/torrc"]
|
|
|
|
# keeping dns requests as network-liveness is too optimistic
|
|
# https://gitweb.torproject.org/torspec.git/tree/control-spec.txt
|
|
HEALTHCHECK CMD \
|
|
printf "AUTHENTICATE\nGETINFO network-liveness\nQUIT\n" | nc localhost 9051 \
|
|
| grep -q network-liveness=up \
|
|
&& nslookup -port=9053 google.com localhost | grep -v NXDOMAIN | grep -q google \
|
|
|| exit 1
|