mirror of
https://github.com/cmehay/docker-tor-hidden-service.git
synced 2025-06-03 13:20:33 +00:00
Add tor v3 addresses support
This commit is contained in:
parent
8d562ed2e6
commit
9e40a2d075
24 changed files with 1086 additions and 225 deletions
56
Dockerfile
56
Dockerfile
|
@ -1,39 +1,43 @@
|
|||
FROM alpine
|
||||
FROM alpine:latest
|
||||
ARG tor_version
|
||||
|
||||
ENV HOME /var/lib/tor
|
||||
|
||||
RUN apk add --no-cache git libevent-dev openssl-dev gcc make automake ca-certificates autoconf musl-dev coreutils && \
|
||||
mkdir -p /usr/local/src/ && \
|
||||
git clone https://git.torproject.org/tor.git /usr/local/src/tor && \
|
||||
cd /usr/local/src/tor && \
|
||||
git checkout $(git branch -a | grep 'release' | sort -V | tail -1) && \
|
||||
./autogen.sh && \
|
||||
./configure \
|
||||
--disable-asciidoc \
|
||||
--sysconfdir=/etc \
|
||||
--disable-unittests && \
|
||||
make && make install && \
|
||||
cd .. && \
|
||||
rm -rf tor && \
|
||||
apk add --no-cache python3 python3-dev && \
|
||||
python3 -m ensurepip && \
|
||||
rm -r /usr/lib/python*/ensurepip && \
|
||||
pip3 install --upgrade pip setuptools pycrypto && \
|
||||
apk del git libevent-dev openssl-dev make automake python3-dev gcc autoconf musl-dev coreutils && \
|
||||
apk add --no-cache libevent openssl
|
||||
RUN apk add --no-cache git libevent-dev openssl-dev gcc make automake ca-certificates autoconf musl-dev coreutils zlib-dev && \
|
||||
mkdir -p /usr/local/src/ && \
|
||||
git clone https://git.torproject.org/tor.git /usr/local/src/tor && \
|
||||
cd /usr/local/src/tor && \
|
||||
git checkout tor-$tor_version && \
|
||||
./autogen.sh && \
|
||||
./configure \
|
||||
--disable-asciidoc \
|
||||
--sysconfdir=/etc \
|
||||
--disable-unittests && \
|
||||
make && make install && \
|
||||
cd .. && \
|
||||
rm -rf tor && \
|
||||
apk add --no-cache python3 python3-dev && \
|
||||
python3 -m ensurepip && \
|
||||
rm -r /usr/lib/python*/ensurepip && \
|
||||
pip3 install --upgrade pip setuptools && \
|
||||
apk del git libevent-dev openssl-dev make automake python3-dev autoconf musl-dev coreutils && \
|
||||
apk add --no-cache libevent openssl
|
||||
|
||||
RUN mkdir -p /etc/tor/
|
||||
|
||||
ADD assets/entrypoint-config.yml /
|
||||
ADD assets/onions /usr/local/src/onions
|
||||
ADD assets/torrc /var/local/tor/torrc.tpl
|
||||
COPY assets/onions /usr/local/src/onions
|
||||
COPY assets/torrc /var/local/tor/torrc.tpl
|
||||
|
||||
|
||||
RUN cd /usr/local/src/onions && python3 setup.py install
|
||||
RUN cd /usr/local/src/onions && apk add --no-cache openssl-dev libffi-dev gcc python3-dev libc-dev && \
|
||||
python3 setup.py install && \
|
||||
apk del libffi-dev gcc python3-dev libc-dev openssl-dev
|
||||
|
||||
RUN mkdir -p ${HOME}/.tor && \
|
||||
addgroup -S -g 107 tor && \
|
||||
adduser -S -G tor -u 104 -H -h ${HOME} tor
|
||||
addgroup -S -g 107 tor && \
|
||||
adduser -S -G tor -u 104 -H -h ${HOME} tor
|
||||
|
||||
COPY assets/entrypoint-config.yml /
|
||||
|
||||
VOLUME ["/var/lib/tor/hidden_service/"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue