mirror of
https://github.com/fphammerle/docker-tor-proxy.git
synced 2025-10-27 02:43:35 +01:00
healthcheck: replace dig with pre-installed nslookup
This commit is contained in:
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Removed
|
||||
- `curl`
|
||||
- `bin-tools` package including `dig`
|
||||
|
||||
## [3.0.0] - 2020-10-03
|
||||
### Added
|
||||
|
||||
+2
-5
@@ -1,10 +1,7 @@
|
||||
FROM alpine:3.12.3
|
||||
|
||||
ARG BIND_TOOLS_PACKAGE_VERSION=9.16.6-r0
|
||||
ARG TOR_PACKAGE_VERSION=0.4.3.7-r0
|
||||
RUN apk add --no-cache \
|
||||
bind-tools=$BIND_TOOLS_PACKAGE_VERSION `# dig` \
|
||||
tor=$TOR_PACKAGE_VERSION
|
||||
RUN apk add --no-cache tor=$TOR_PACKAGE_VERSION
|
||||
VOLUME /var/lib/tor
|
||||
|
||||
#RUN apk add --no-cache \
|
||||
@@ -28,5 +25,5 @@ CMD ["tor", "-f", "/tmp/torrc"]
|
||||
HEALTHCHECK CMD \
|
||||
printf "AUTHENTICATE\nGETINFO network-liveness\nQUIT\n" | nc localhost 9051 \
|
||||
| grep -q network-liveness=up \
|
||||
&& dig -p 9053 +notcp +short google.com @localhost \
|
||||
&& nslookup -port=9053 google.com localhost | grep -v NXDOMAIN | grep -q google \
|
||||
|| exit 1
|
||||
|
||||
Reference in New Issue
Block a user