forked from opsxcq/docker-tor-hiddenservice-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (29 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM debian:bullseye
# Base packages
RUN apt-get update && \
apt-get -y install \
nginx \
tor torsocks ntpdate
ADD ./mkp224o /mkp224o
RUN cd /mkp224o \
&& apt-get -y install gcc libsodium-dev make autoconf automake autoconf \
&& ./autogen.sh && ./configure && make && ls -lah && cp ./mkp224o /bin
# Security and permissions
RUN useradd --system --uid 666 -M --shell /usr/sbin/nologin hidden
# Configure nginx logs to go to Docker log collection (via stdout/stderr)
RUN ln --symbolic --force /dev/stdout /var/log/nginx/access.log
RUN ln --symbolic --force /dev/stderr /var/log/nginx/error.log
# Main script
ADD ./main.sh /main.sh
# Tor Config
ADD ./torrc /etc/tor/torrc
# Add nginx default configuration
ADD ./nginx.conf /etc/nginx/nginx.conf
# Configuration files and data output folder
VOLUME /web
WORKDIR /web
ENTRYPOINT ["/main.sh"]
CMD ["serve"]
# docker build -t tor-hiddenservice-nginx .
# docker run -it --rm -v $(pwd)/web:/web tor-hiddenservice-nginx generate <pattern>
# docker run -d --restart=always --name hiddensite -v $(pwd)/web:/web tor-hiddenservice-nginx