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"] RUN ["chmod", "755", "/app/stream.py"] FROM base as sources COPY ["sources.py", "/app/sources.py"] COPY ["tv.m3u8", "/app/tv.m3u8"] RUN ["python3", "/app/sources.py"] FROM scratch COPY --from=base / / COPY --from=sources /app/sources.m3u8 /app/sources.m3u8 USER 1444:1444 ENTRYPOINT ["/app/stream.py"]