FROM alpine:edge as base RUN ["apk", "add", "--no-cache", "--repository", "https://dl-cdn.alpinelinux.org/alpine/edge/testing", "streamlink", "py3-tornado", "py3-aiohttp", "py3-aiohttp-socks"] RUN ["mkdir", "/app"] COPY ["stream.py", "/app/stream.py"] COPY ["sources.py", "/app/sources.py"] COPY ["frontend/index.html", "/app/index.html"] COPY ["frontend/script.js", "/app/script.js"] COPY ["frontend/style.css", "/app/style.css"] 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"]