Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # https://pkgs.alpinelinux.org/packages?name=obfs4proxy&arch=x86_64
  2. FROM docker.io/alpine:3.18.2
  3. # https://gitweb.torproject.org/tor.git/plain/ChangeLog
  4. # https://git.alpinelinux.org/aports/log/community/tor?h=3.18-stable
  5. ARG TOR_PACKAGE_VERSION=0.4.8.4-r0
  6. # https://git.alpinelinux.org/aports/log/testing/obfs4proxy
  7. ARG OBFS4PROXY_PACKAGE_VERSION=0.0.14-r9
  8. RUN apk add --no-cache tor=$TOR_PACKAGE_VERSION \
  9. && apk add --no-cache obfs4proxy=$OBFS4PROXY_PACKAGE_VERSION \
  10. --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
  11. #RUN apk add --no-cache \
  12. # less \
  13. # man-db \
  14. # tor-doc=$TOR_PACKAGE_VERSION
  15. #ENV PAGER=less
  16. ENV OR_PORT=
  17. ENV PT_PORT=
  18. ENV CONTACT_INFO=
  19. COPY torrc.template entrypoint.sh /
  20. RUN chmod -c a+rX /torrc.template /entrypoint.sh
  21. ENTRYPOINT ["/entrypoint.sh"]
  22. USER tor
  23. VOLUME /var/lib/tor
  24. CMD ["tor", "-f", "/tmp/torrc"]
  25. # https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
  26. ARG REVISION=
  27. LABEL org.opencontainers.image.title="tor bridge providing obfs4 obfuscation protocol" \
  28. org.opencontainers.image.source="https://github.com/fphammerle/docker-tor-obfs4-bridge" \
  29. org.opencontainers.image.revision="$REVISION"