2019-06-22 06:45:30 +00:00
|
|
|
FROM alpine:3.10
|
2017-01-10 01:17:07 +00:00
|
|
|
|
2018-07-11 06:38:31 +00:00
|
|
|
LABEL maintainer="Peter Dave Hello <hsu@peterdavehello.org>"
|
2018-07-11 06:39:22 +00:00
|
|
|
LABEL name="tor-socks-proxy"
|
2018-07-11 06:40:13 +00:00
|
|
|
LABEL version="latest"
|
2017-01-10 01:17:07 +00:00
|
|
|
|
2017-10-10 10:34:39 +00:00
|
|
|
RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
|
|
|
|
apk -U upgrade && \
|
2018-02-23 19:29:31 +00:00
|
|
|
apk -v add tor@edge curl && \
|
2019-07-28 19:31:58 +00:00
|
|
|
chmod 700 /var/lib/tor && \
|
2017-01-10 01:17:07 +00:00
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
RUN tor --version
|
2018-07-11 06:34:29 +00:00
|
|
|
COPY torrc /etc/tor/
|
2017-01-10 01:17:07 +00:00
|
|
|
|
2018-02-23 19:29:31 +00:00
|
|
|
HEALTHCHECK --timeout=10s --start-period=60s \
|
|
|
|
CMD curl --fail --socks5-hostname localhost:9150 -I -L 'https://cdnjs.com/' || exit 1
|
|
|
|
|
2017-01-10 01:17:07 +00:00
|
|
|
EXPOSE 9150
|
|
|
|
|
2018-07-11 06:36:00 +00:00
|
|
|
CMD ["/usr/bin/tor", "-f", "/etc/tor/torrc"]
|