simplified tor image
parent
b89904e84f
commit
75bc830def
|
@ -1,7 +1,14 @@
|
|||
FROM alpine:3.12
|
||||
FROM alpine:3.13
|
||||
|
||||
RUN apk add --no-cache tor su-exec shadow
|
||||
COPY entrypoint.sh /entrypoint
|
||||
RUN chmod +x entrypoint
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
CMD ["tor"]
|
||||
RUN addgroup --gid 10001 tor && \
|
||||
adduser \
|
||||
--uid 10000 \
|
||||
--home /var/lib/tor \
|
||||
--ingroup tor \
|
||||
--disabled-password \
|
||||
--shell /sbin/nologin \
|
||||
tor && \
|
||||
apk add --no-cache tor
|
||||
|
||||
USER tor
|
||||
CMD tor
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -xe
|
||||
|
||||
[ -n "${USER_ID}" ] && usermod -u "${USER_ID}" tor
|
||||
|
||||
for dir in $(awk '{if ($1 == "HiddenServiceDir") print $2}' /etc/tor/torrc)
|
||||
do
|
||||
mkdir -p "${dir}"
|
||||
chown tor "${dir}"
|
||||
chmod 700 "${dir}"
|
||||
done
|
||||
|
||||
su-exec tor "$@"
|
Loading…
Reference in New Issue