Open jarandaf opened 5 months ago
Hey man, i fixed the docker file:
FROM alpine:3.19 RUN apk update RUN apk add --no-cache alpine-sdk RUN apk add --no-cache py3-pip RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" RUN pip3 install ntfy RUN pip3 install websocket-client RUN sed -i '6s+getargspec+getfullargspec+1' /opt/venv/lib/python3.11/site-packages/ntfy/__init__.py RUN rm -fr /var/cache/* ENV GOTIFY_TOKEN=xyz ENV GOTIFY_HOST=gotify.example.org ENV PUSHOVER_USERKEY=abcdefghijklmnopqrstuvwxyz COPY pushtify-listener.py /usr/local/bin ENTRYPOINT ["python3","/usr/local/bin/pushtify-listener.py"]
And to run just fix the envs below:
docker run --name pushtify -e GOTIFY_TOKEN=zzz -e GOTIFY_HOST=gotify.example.org -e PUSHOVER_USERKEY=xxx ghcr.io/sebw/pushtify:v0.5
Use this one to run on background and start on boot
docker run -d --restart unless-stopped --name pushtify -e GOTIFY_TOKEN=zzz -e GOTIFY_HOST=gotify.example.org -e PUSHOVER_USERKEY=xxx ghcr.io/sebw/pushtify:v0.5
Are you still having issues rebuilding?
That did not work for me at least. I believe the problem is that Python package ntfy
doesn't support Python 3.11 or newer. It seems to build and run with this modified Dockerfile
:
FROM python:3.10.7-alpine3.16
RUN pip install ntfy && \
pip install websocket-client && \
rm -rf /var/cache/*
ENV GOTIFY_TOKEN=xyz
ENV GOTIFY_HOST=gotify.example.org
ENV PUSHOVER_USERKEY=abcdefghijklmnopqrstuvwxyz
COPY pushtify-listener.py /usr/local/bin
ENTRYPOINT ["python3","/usr/local/bin/pushtify-listener.py"]
I can't seem to build this docker image, mostly due to this ntfy dependency
ruamel.yaml.clib>=0.2.7
. I get the following error: