1
Fork 1
mirror of https://git.lolcat.ca/lolcat/4get.git synced 2024-11-08 17:43:07 -05:00
4get/docker/tor/Dockerfile
2024-06-19 19:24:01 -07:00

18 lines
447 B
Docker

FROM alpine:edge
RUN apk add --no-cache curl tor
EXPOSE 9050
HEALTHCHECK --interval=60s --timeout=15s --start-period=20s \
CMD curl -x socks5h://127.0.0.1:9050 'https://check.torproject.org/api/ip' | grep -qm1 -E '"IsTor"\s*:\s*true'
# default owner is tor, but running as root to avoid docker volume mount issue
RUN chown -R root:root /var/lib/tor
VOLUME ["/var/lib/tor/4get"]
COPY ./torrc /etc/tor/torrc
ENTRYPOINT ["/usr/bin/tor"]