stream-api/Dockerfile

20 lines
664 B
Docker

FROM alpine:edge as base
RUN ["apk", "add", "--no-cache", "--repository", "https://dl-cdn.alpinelinux.org/alpine/edge/testing", "streamlink", "py3-tornado"]
RUN ["mkdir", "/app"]
COPY ["stream.py", "/app/stream.py"]
COPY ["sources.py", "/app/sources.py"]
COPY ["index.html", "/app/index.html"]
COPY ["script.js", "/app/script.js"]
RUN ["chmod", "-R", "755", "/app"]
COPY ["tv.json", "/app/tv.json"]
RUN ["python3", "/app/sources.py"]
RUN ["rm", "/app/tv.json"]
RUN ["rm", "/app/sources.py"]
FROM scratch
COPY --from=base / /
USER 1444:1444
ENV ICECAST_SERVER=https://icecast.purser.it:7000
ENV STREAM_SERVER=https://stream.purser.it
ENTRYPOINT ["/app/stream.py"]