|
@@ -1,10 +1,7 @@
|
|
|
FROM alpine:3.12
|
|
|
|
|
|
-ARG NETCAT_PACKAGE_VERSION=1.130-r1
|
|
|
ARG TOR_PACKAGE_VERSION=0.4.3.5-r0
|
|
|
-RUN apk add --no-cache \
|
|
|
- netcat-openbsd=$NETCAT_PACKAGE_VERSION \
|
|
|
- tor=$TOR_PACKAGE_VERSION \
|
|
|
+RUN apk add --no-cache tor=$TOR_PACKAGE_VERSION \
|
|
|
&& mkdir -m u=rwx,g=,o= /onion-service \
|
|
|
&& chown tor /onion-service
|
|
|
VOLUME /var/lib/tor
|
|
@@ -26,6 +23,7 @@ ENTRYPOINT ["/entrypoint.sh"]
|
|
|
USER tor
|
|
|
CMD ["tor", "-f", "/tmp/torrc"]
|
|
|
|
|
|
+
|
|
|
HEALTHCHECK CMD \
|
|
|
- nc -x localhost:9050 -z "$(cat /onion-service/hostname)" "$VIRTUAL_PORT" \
|
|
|
- || exit 1
|
|
|
+ printf "AUTHENTICATE\nGETINFO network-liveness\nQUIT\n" | nc localhost 9051 \
|
|
|
+ | grep -q network-liveness=up || exit 1
|