This commit is contained in:
2025-01-30 11:08:23 +01:00
parent f18787a39f
commit f899c17ac0
4 changed files with 20 additions and 7 deletions

View File

@@ -1,11 +1,18 @@
FROM harshitbudhraja/tor-nginx-proxy
FROM nginx:1.25-alpine
LABEL name="custom-tor-nginx-proxy"
LABEL version="1.0.1"
LABEL maintainer="ALittlePatate (https://github.com/ALittlePatate/tor-proxy-fix)"
# Metadata about the docker image
LABEL name="tor-nginx-proxy-fix"
LABEL version="1.0.0-beta-1.0"
LABEL maintainer="ALittlePatate (https://github.com/ALittlePatate)"
COPY default.conf /etc/nginx/conf.d/default.conf
# Update packages and install tor
RUN apk --update --allow-untrusted --repository http://dl-4.alpinelinux.org/alpine/edge/community/ add \
tor && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
RUN nginx -t
# Copy nginx and tor configurations
COPY default.conf.template /etc/nginx/templates/default.conf.template
COPY torrc /etc/tor/torrc
EXPOSE 80
# Add script to start tor
COPY start-tor.sh /docker-entrypoint.d/40-start-tor.sh
RUN chmod +x /docker-entrypoint.d/40-start-tor.sh

2
start-tor.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
tor -f /etc/tor/torrc &

4
torrc Normal file
View File

@@ -0,0 +1,4 @@
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
Log notice stdout
RunAsDaemon 0