healthcheck: replace dig with pre-installed nslookup

This commit is contained in:
Fabian Peter Hammerle
2021-01-01 16:37:44 +01:00
parent 6a9e7a1f42
commit dfe104eb09
2 changed files with 3 additions and 5 deletions
+1
View File
@@ -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
View File
@@ -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