Add docker-compose
This commit is contained in:
parent
bd6188eeb7
commit
b9156bb913
4 changed files with 53 additions and 43 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,21 +1,17 @@
|
|||
FROM python:3.10.4-alpine
|
||||
|
||||
RUN apk --update --no-cache --no-progress add gcc libffi-dev musl-dev make tor openssl g++ \
|
||||
&& echo "ControlPort 9051" >> /etc/tor/torrc \
|
||||
&& echo "CookieAuthentication 1" >> /etc/tor/torrc
|
||||
RUN apk --update --no-cache --no-progress add gcc libffi-dev musl-dev make openssl g++
|
||||
|
||||
WORKDIR /app
|
||||
VOLUME /app/data
|
||||
COPY . .
|
||||
|
||||
RUN python3 -m venv venv \
|
||||
&& source venv/bin/activate \
|
||||
&& python3 -m pip install -r requirements.txt
|
||||
|
||||
ENV ENABLE_TOR false
|
||||
|
||||
CMD (! ${ENABLE_TOR} || tor&) \
|
||||
&& source venv/bin/activate \
|
||||
&& python3 zeronet.py --ui_ip "*" --fileserver_port 26552
|
||||
CMD source venv/bin/activate \
|
||||
&& python3 zeronet.py --ui_ip "*" --fileserver_port 26552 \
|
||||
--tor $TOR_ENABLED --tor_controller tor:$TOR_CONTROL_PORT \
|
||||
--tor_proxy tor:$TOR_SOCKS_PORT --tor_password $TOR_CONTROL_PASSWD
|
||||
|
||||
EXPOSE 43110 26552
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue