2020-12-16 01:54:33 +00:00
|
|
|
FROM python:3.7
|
2018-08-05 06:35:49 +00:00
|
|
|
|
2020-12-16 01:54:33 +00:00
|
|
|
USER root
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
ENV PORT=8080
|
|
|
|
EXPOSE 8080
|
2018-08-05 06:35:49 +00:00
|
|
|
|
|
|
|
#Install needed packages
|
2020-12-16 01:54:33 +00:00
|
|
|
RUN apt-get update && apt-get install -y tor locales
|
2018-08-17 21:50:16 +00:00
|
|
|
|
|
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
|
|
locale-gen
|
2020-12-16 01:54:33 +00:00
|
|
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
|
2018-08-05 06:35:49 +00:00
|
|
|
|
2020-12-16 01:54:33 +00:00
|
|
|
ADD ./requirements.txt /app/requirements.txt
|
2019-08-30 09:23:44 +00:00
|
|
|
RUN pip3 install --require-hashes -r requirements.txt
|
2018-08-05 06:35:49 +00:00
|
|
|
|
2018-08-10 22:13:58 +00:00
|
|
|
#Add Onionr source
|
2020-12-16 01:54:33 +00:00
|
|
|
COPY . /app/
|
2018-08-05 06:35:49 +00:00
|
|
|
|
2020-12-16 01:54:33 +00:00
|
|
|
VOLUME /app/data/
|
2018-08-05 06:35:49 +00:00
|
|
|
|
2020-12-16 01:54:33 +00:00
|
|
|
#Default to running as nonprivileged user
|
|
|
|
RUN chmod g=u -R /app
|
|
|
|
USER 1000
|
|
|
|
|
|
|
|
CMD ["bash", "./onionr.sh"]
|