aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 7b90a2ca185f4d7fda9bd99655db51efb4ab50ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Startdate: 2023-06-15-5 11:49
# Purpose: docker image for newspipe
# Usage:
#    docker build . --tag newspipe:latest
#    docker run -p 5938:8081 --mount type=bind,source=./instance,destination=/newspipe/instance -it --rm newspipe:latest
FROM devuan/devuan:unstable
MAINTAINER bgstack15@gmail.com

ENV NEWSPIPE_CONFIG=sqlite.py
ENV FLASK_APP=runserver.py
ENV FLASK_DEBUG=1
ENV PATH="${PATH}":/
# Instructions from https://git.sr.ht/~cedric/newspipe
RUN apt-get update && \
   apt-get -y install --no-install-recommends git npm python3-poetry python3-babel python3-flask && \
   rm -rf /var/lib/apt/lists/* || : ; \
   git clone https://bgstack15.ddns.net/cgit/newspipe /newspipe && \
   git config --global --add safe.directory /newspipe && \
   cd newspipe && \
   git checkout ldap-auth && \
   npm install && \
   npm ci
WORKDIR /newspipe
# ldap3 line is required for only branch ldap-auth
RUN poetry install --no-dev && \
   poetry run pip3 install ldap3 dnspython && \
   poetry run pybabel compile -d newspipe/translations && \
   poetry run flask db_create || : ; \
   poetry run flask db_init ; \
   cp -prf instance orig
   # if you want to hardcode this in the image:
   #cp -prf instance orig && \
   #poetry run flask create_admin --nickname "admin" --password "1234567890"
COPY entrypoint.sh /
EXPOSE 8081
CMD [ "/entrypoint.sh" ]
bgstack15