Skip to content

Commit 4aace4d

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 4aace4d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Dockerfile.ubuntu

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 pip3 install -r requirements.txt && chown znuser:znuser -R data
25+
26+
USER znuser
27+
28+
# Show verbose info
29+
RUN python3 -V \
30+
&& python3 -m pip list \
31+
&& tor --version \
32+
&& openssl version
33+
34+
# Control if Tor proxy is started
35+
ENV ENABLE_TOR false
36+
37+
#Set upstart command
38+
CMD (! ${ENABLE_TOR} || tor&) && python3 zeronet.py --ui_ip 0.0.0.0 --ui_host 127.0.0.1:43110 --fileserver_port 26552
39+
40+
# Expose ports
41+
EXPOSE 43110 26552

0 commit comments

Comments
 (0)