added --no-cache and better permissions for user
added --no-cache option and changed the removed directory to only /tmp/ better permissions for tor user, the default one is enough to be safe changed CMD to ENTRYPOINT, it's just for standarization
This commit is contained in:
parent
88d96733ce
commit
0d2d190110
11
Dockerfile
11
Dockerfile
|
@ -7,11 +7,12 @@ LABEL version="latest"
|
||||||
RUN echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
|
RUN echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
|
||||||
echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
|
echo '@edge https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
|
||||||
apk -U upgrade && \
|
apk -U upgrade && \
|
||||||
apk -v add tor@edge obfs4proxy@edge curl && \
|
apk -v add --no-cache tor@edge obfs4proxy@edge curl && \
|
||||||
chmod 700 /var/lib/tor && \
|
chown -R tor /var/lib/tor/ && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /tmp/* && \
|
||||||
tor --version
|
tor --version
|
||||||
COPY --chown=tor:root torrc /etc/tor/
|
|
||||||
|
COPY --chown=tor torrc /etc/tor/
|
||||||
|
|
||||||
HEALTHCHECK --timeout=10s --start-period=60s \
|
HEALTHCHECK --timeout=10s --start-period=60s \
|
||||||
CMD curl --fail --socks5-hostname localhost:9150 -I -L 'https://www.facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd.onion/' || exit 1
|
CMD curl --fail --socks5-hostname localhost:9150 -I -L 'https://www.facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd.onion/' || exit 1
|
||||||
|
@ -19,4 +20,4 @@ HEALTHCHECK --timeout=10s --start-period=60s \
|
||||||
USER tor
|
USER tor
|
||||||
EXPOSE 8853/udp 9150/tcp
|
EXPOSE 8853/udp 9150/tcp
|
||||||
|
|
||||||
CMD ["/usr/bin/tor", "-f", "/etc/tor/torrc"]
|
ENTRYPOINT ["/usr/bin/tor", "-f", "/etc/tor/torrc"]
|
||||||
|
|
Loading…
Reference in a new issue