Skip to content

Commit e2c46b4

Browse files
committed
Add Dockerfile based on Ubuntu 16.04
The official Dockerfile on alpine:3.11 doesn't work on Raspberypi OS (RPI4), this works fine
1 parent 29dac8a commit e2c46b4

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Dockerfile.ubuntu

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM ubuntu:20.04
2+
3+
#Timezone settings
4+
ENV TZ=Etc/UTC
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

0 commit comments

Comments
 (0)