12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- FROM docker.io/alpine:3.19.0
- ARG GETTEXT_PACKAGE_VERSION=0.22.3-r0
- ARG TOR_PACKAGE_VERSION=0.4.8.10-r0
- RUN apk add --no-cache \
- tor=$TOR_PACKAGE_VERSION \
- gettext-envsubst=$GETTEXT_PACKAGE_VERSION \
- && mkdir -m u=rwx,g=,o= /onion-service \
- && chown tor /onion-service
- VOLUME /var/lib/tor
- VOLUME /onion-service
- COPY torrc.template entrypoint.sh /
- RUN chmod -c a+rX /torrc.template /entrypoint.sh
- ENV VERSION 3
- ENV VIRTUAL_PORT 80
- ENV TARGET 1.2.3.4:8080
- ENV NON_ANONYMOUS_SINGLE_HOP_MODE 0
- ENTRYPOINT ["/entrypoint.sh"]
- USER tor
- CMD ["tor", "-f", "/tmp/torrc"]
- HEALTHCHECK CMD \
- printf "AUTHENTICATE\nGETINFO network-liveness\nQUIT\n" | nc localhost 9051 \
- | grep -q network-liveness=up || exit 1
- ARG REVISION=
- LABEL org.opencontainers.image.title="tor onion service" \
- org.opencontainers.image.source="https://github.com/fphammerle/docker-onion-service" \
- org.opencontainers.image.revision="$REVISION"
|