2020-10-20 16:58:42 +00:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
ARG SVC_HOST
|
|
|
|
ARG SVC_PORT
|
|
|
|
|
|
|
|
WORKDIR /etc/tor
|
|
|
|
|
|
|
|
RUN apk add --no-cache curl tor && \
|
|
|
|
echo -e "HiddenServiceDir /var/lib/tor/svc/\nHiddenServicePort $SVC_PORT $SVC_HOST:$SVC_PORT" > ./torrc
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=60s --timeout=15s --start-period=20s \
|
|
|
|
CMD curl -s --socks5 127.0.0.1:9050 'https://check.torproject.org/' | grep -qm1 Congratulations
|
|
|
|
|
2020-10-22 17:16:10 +00:00
|
|
|
COPY tor.sh /usr/local/bin/
|
|
|
|
COPY svc-hostname /usr/local/bin/
|
2020-10-20 16:58:42 +00:00
|
|
|
|
|
|
|
#USER tor
|
|
|
|
|
2020-10-22 17:16:10 +00:00
|
|
|
CMD [ "tor.sh", "$SVC_HOST" ]
|