aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-06-18 16:05:33 -0400
committerB. Stack <bgstack15@gmail.com>2023-06-18 16:05:33 -0400
commitd63c2a00f96d9c0391704fd7e9735d47717087b9 (patch)
tree0cb2e764b864adda4e71429f7dc46fc684d755f5 /Dockerfile
downloadnewspipe-docker-d63c2a00f96d9c0391704fd7e9735d47717087b9.tar.gz
newspipe-docker-d63c2a00f96d9c0391704fd7e9735d47717087b9.tar.bz2
newspipe-docker-d63c2a00f96d9c0391704fd7e9735d47717087b9.zip
initial commit
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile36
1 files changed, 36 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..7b90a2c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,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