Skip to content

Commit

Permalink
Merge pull request #1 from mayankchhabra/patch-uid
Browse files Browse the repository at this point in the history
Don't run Tor as root
  • Loading branch information
mayankchhabra authored Jul 17, 2020
2 parents 26abd19 + 28eee0d commit a4d4b86
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
FROM alpine:3.11

ARG USER=toruser
ARG UID=1000

RUN apk add --no-cache tor

RUN adduser \
--disabled-password \
--gecos "" \
--uid "$UID" \
"$USER"

VOLUME /etc/tor/
VOLUME /var/lib/tor/

EXPOSE 9050 9051 29050 29051

ENTRYPOINT ["tor"]
ENTRYPOINT ["tor"]

0 comments on commit a4d4b86

Please sign in to comment.