Dockerfile 399 B

12345678910111213141516171819202122
  1. FROM alpine:3.8
  2. RUN apk add --no-cache tor
  3. RUN adduser -S onion
  4. RUN mkdir -m u=rwx,g=,o= /onion-service && chown onion /onion-service
  5. VOLUME /onion-service
  6. COPY torrc.template /
  7. RUN chmod a+r /torrc.template
  8. ENV VERSION 3
  9. ENV VIRTUAL_PORT 80
  10. ENV TARGET 127.0.0.1:8080
  11. COPY entrypoint.sh /
  12. RUN chmod a+rx /entrypoint.sh
  13. ENTRYPOINT ["/entrypoint.sh"]
  14. USER onion
  15. CMD ["tor", "-f", "/tmp/torrc"]