alpine for tor

This commit is contained in:
finn 2024-08-08 04:42:12 -07:00
parent c295d52520
commit 1c6293fda3
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,8 @@
FROM debian:12-slim FROM alpine
RUN adduser --disabled-password --gecos "" tor RUN adduser --disabled-password --gecos "" tor
RUN apt update && apt install -y tor curl RUN apk update && apk add tor
COPY hidden_service /hidden_service COPY hidden_service /hidden_service
COPY torrc /etc/tor/torrc COPY torrc /etc/tor/torrc
@ -10,6 +10,7 @@ COPY entrypoint.sh /
RUN chown -R tor /etc/tor RUN chown -R tor /etc/tor
RUN chown -R tor /hidden_service RUN chown -R tor /hidden_service
RUN chown -R tor /entrypoint.sh
RUN chmod -R go-rwx /etc/tor RUN chmod -R go-rwx /etc/tor
RUN chmod -R go-rwx /hidden_service RUN chmod -R go-rwx /hidden_service

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/ash
if $USE_TOR ; then if $USE_TOR ; then
echo "@@@@@@@@@@ TOR ENABLED BY ENV" echo "@@@@@@@@@@ TOR ENABLED BY ENV"
exec tor exec /usr/bin/tor
else else
echo "@@@@@@@@@@ TOR DISABLED BY ENV" echo "@@@@@@@@@@ TOR DISABLED BY ENV"
fi fi