Dockerfile 856 B

12345678910111213141516171819202122232425262728
  1. FROM alpine:3.10
  2. ARG CURL_PACKAGE_VERSION=7.66.0-r0
  3. ARG BIND_TOOLS_PACKAGE_VERSION=9.14.3-r0
  4. ARG TOR_PACKAGE_VERSION=0.4.1.6-r0
  5. ARG TOR_PACKAGE_REPOSITORY=http://dl-cdn.alpinelinux.org/alpine/edge/community
  6. RUN adduser -S onion \
  7. && apk add --no-cache \
  8. curl=$CURL_PACKAGE_VERSION \
  9. bind-tools=$BIND_TOOLS_PACKAGE_VERSION `# dig` \
  10. && apk add --no-cache --repository $TOR_PACKAGE_REPOSITORY \
  11. tor=$TOR_PACKAGE_VERSION
  12. # RUN apk add --no-cache man less \
  13. # && apk add --no-cache tor-doc=$TOR_PACKAGE_VERSION \
  14. # --repository $TOR_PACKAGE_REPOSITORY
  15. # ENV PAGER=less
  16. EXPOSE 9050/tcp
  17. EXPOSE 53/udp
  18. COPY torrc /etc/tor/torrc
  19. CMD ["tor"]
  20. HEALTHCHECK CMD \
  21. curl --silent --socks5 localhost:9050 https://google.com > /dev/null \
  22. && [ ! -z "$(dig +notcp +short one.one.one.one @localhost)" ] \
  23. || exit 1