-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 925 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM alpine:3.18.2
LABEL maintainer="dwightgunning"
RUN apk add --no-cache \
tor=0.4.7.13-r2 \
privoxy=3.0.34-r2 \
runit=2.1.2-r7 \
curl=8.1.2-r0
COPY --link ./services/tor/torrc /etc/tor/torrc
COPY --link ./services/privoxy/config /etc/privoxy/config
COPY --link ./services/tor/run /etc/service/tor/run
COPY --link ./services/privoxy/run /etc/service/privoxy/run
COPY --link ./healthcheck.sh /usr/local/bin/healthcheck.sh
RUN addgroup -S anonwebproxy \
&& adduser -S anonwebproxy -G anonwebproxy \
&& chown -R anonwebproxy:anonwebproxy /etc/tor \
&& chown -R anonwebproxy:anonwebproxy /etc/privoxy \
&& chown -R anonwebproxy:anonwebproxy /etc/service \
&& chown -R anonwebproxy:anonwebproxy /usr/local/bin/healthcheck.sh
USER anonwebproxy
EXPOSE 8118 9050
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=3 \
CMD /usr/local/bin/healthcheck.sh
CMD ["runsvdir", "/etc/service"]