Add HEALTHCHECK support, close #2
This commit is contained in:
parent
80db924d8d
commit
3b1727ab3d
1 changed files with 4 additions and 1 deletions
|
@ -4,11 +4,14 @@ MAINTAINER Peter Dave Hello <hsu@peterdavehello.org>
|
|||
|
||||
RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
|
||||
apk -U upgrade && \
|
||||
apk -v add tor@edge && \
|
||||
apk -v add tor@edge curl && \
|
||||
rm -rf /var/cache/apk/*
|
||||
RUN tor --version
|
||||
ADD torrc /etc/tor/
|
||||
|
||||
HEALTHCHECK --timeout=10s --start-period=60s \
|
||||
CMD curl --fail --socks5-hostname localhost:9150 -I -L 'https://cdnjs.com/' || exit 1
|
||||
|
||||
EXPOSE 9150
|
||||
|
||||
CMD /usr/bin/tor -f /etc/tor/torrc
|
||||
|
|
Loading…
Reference in a new issue