0d2d190110
added --no-cache option and changed the removed directory to only /tmp/ better permissions for tor user, the default one is enough to be safe changed CMD to ENTRYPOINT, it's just for standarization
24 lines
811 B
Docker
24 lines
811 B
Docker
FROM alpine:3.17
|
|
|
|
LABEL maintainer="Peter Dave Hello <hsu@peterdavehello.org>"
|
|
LABEL name="tor-socks-proxy"
|
|
LABEL version="latest"
|
|
|
|
RUN echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
|
|
echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
|
|
apk -U upgrade && \
|
|
apk -v add --no-cache tor@edge obfs4proxy@edge curl && \
|
|
chown -R tor /var/lib/tor/ && \
|
|
rm -rf /tmp/* && \
|
|
tor --version
|
|
|
|
COPY --chown=tor torrc /etc/tor/
|
|
|
|
HEALTHCHECK --timeout=10s --start-period=60s \
|
|
CMD curl --fail --socks5-hostname localhost:9150 -I -L 'https://www.facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd.onion/' || exit 1
|
|
|
|
USER tor
|
|
EXPOSE 8853/udp 9150/tcp
|
|
|
|
ENTRYPOINT ["/usr/bin/tor", "-f", "/etc/tor/torrc"]
|