Dockerfile 390 B

123456789101112131415161718192021
  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 --chown=onion:nobody torrc.template /
  7. ENV VERSION 3
  8. ENV VIRTUAL_PORT 80
  9. ENV TARGET 127.0.0.1:8080
  10. COPY entrypoint.sh /
  11. RUN chmod a+rx /entrypoint.sh
  12. ENTRYPOINT ["/entrypoint.sh"]
  13. USER onion
  14. CMD ["tor", "-f", "/tmp/torrc"]