GerryDazoo / Slinger

Reuse SlingBox hardware without SlingBox Servers
170 stars 34 forks source link

Docker image #51

Closed derosm2 closed 1 year ago

derosm2 commented 1 year ago

Any interest in a dockerfile for this? I started to flesh one out but haven't been able to test it yet with a live slingbox:

FROM python:3-slim-buster

# need this to install netifaces
RUN apt-get update -y && apt-get install apt-file -y && apt-file update && apt-get install -y python3-dev build-essential

RUN pip3 install Flask
RUN pip3 install requests
RUN pip3 install netifaces

WORKDIR /home/slingbox
COPY slingbox_server.py slingbox_server.py

CMD [ "python3", "./slingbox_server.py", "/home/slingbox/config/config.ini"]

Then just build the image

docker build -t slinger:1 .

And run it with a link to the directory containing the config.ini file:

docker run -d -v ~/config/:/home/slingbox/config/ slinger:1
GerryDazoo commented 1 year ago

I think that would be useful for some. Also note, the latest code doesn't need the requests module any more, I forgot to delete it from the imports list after I removed the external http dip to get the encryption keys. BTW, thanks for that bug fix. Someone else just stumbled over it in one of the discussions.

GerryDazoo commented 1 year ago

I'd like to close this and keep issues for actual problems with the server code. You can startup a new thread in discussions if you want.