File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:20.04
2+
3+ #Timezone settings
4+ ENV TZ=Europe/Uzhgorod
5+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
6+
7+ #Install dependencies
8+ RUN apt update \
9+ && apt install -y python3-pip tor openssl \
10+ gcc libffi-dev musl-dev make \
11+ pkg-config
12+
13+ #Setup Tor
14+ RUN echo "ControlPort 9051" >> /etc/tor/torrc \
15+ && echo "CookieAuthentication 1" >> /etc/tor/torrc
16+
17+ # Set up a non-root user
18+ RUN useradd --uid 1000 --shell /bin/bash --create-home znuser
19+ WORKDIR /home/znuser
20+
21+ #Add Zeronet source
22+ COPY . .
23+ VOLUME /home/znuser/data
24+ RUN chown znuser:znuser -R data
25+
26+ USER znuser
27+ ENV PATH="/home/znuser/.local/bin:${PATH}"
28+
29+ RUN pip3 install virtualenv \
30+ && virtualenv zeroenv \
31+ && . zeroenv/bin/activate \
32+ && pip3 install -r requirements.txt
33+
34+ RUN . zeroenv/bin/activate \
35+ && python3 -V \
36+ && python3 -m pip list \
37+ && tor --version \
38+ && openssl version
39+
40+ #Control if Tor proxy is started
41+ ENV ENABLE_TOR false
42+
43+ #Set upstart command
44+ CMD (! ${ENABLE_TOR} || tor&) && . zeroenv/bin/activate && python3 zeronet.py --ui_ip 0.0.0.0 --fileserver_port 26552
45+
46+ #Expose ports
47+ EXPOSE 43110 26552
You can’t perform that action at this time.
0 commit comments