stream-api/Dockerfile

31 lines
1.0 KiB
Docker
Raw Normal View History

2021-04-30 08:49:10 +00:00
FROM alpine:edge as base
2021-05-19 08:40:18 +00:00
RUN ["apk", "add", "--no-cache", "py3-virtualenv"]
2021-05-19 13:54:42 +00:00
RUN ["mkdir", "-p", "/app/version"]
2021-05-19 08:40:18 +00:00
COPY ["tv.json", "/app/setup/tv.json"]
COPY ["backend/start.sh", "/app/start.sh"]
COPY ["backend/install.sh", "/app/setup/install.sh"]
COPY ["backend/sources.py", "/app/setup/sources.py"]
COPY ["backend/stream.py", "/app/stream.py"]
2021-05-13 09:15:40 +00:00
COPY ["frontend/index.html", "/app/index.html"]
COPY ["frontend/script.js", "/app/script.js"]
COPY ["frontend/style.css", "/app/style.css"]
2021-05-06 13:23:43 +00:00
RUN ["chmod", "-R", "755", "/app"]
2021-05-19 08:40:18 +00:00
FROM base as sources
RUN ["apk", "add", "--no-cache", "py3-requests"]
RUN ["python3", "/app/setup/sources.py"]
RUN ["rm", "-r", "/app/setup"]
FROM base as venv
RUN ["apk", "add", "--no-cache", "musl-dev", "build-base", "python3-dev"]
RUN ["/app/setup/install.sh"]
RUN ["rm", "-r", "/app/setup"]
2021-04-30 08:49:10 +00:00
FROM scratch
2021-05-19 08:40:18 +00:00
COPY --from=sources / /
COPY --from=venv /app/venv /app/venv
2021-04-30 08:49:10 +00:00
USER 1444:1444
2021-05-06 13:23:43 +00:00
ENV ICECAST_SERVER=https://icecast.purser.it:7000
ENV STREAM_SERVER=https://stream.purser.it
2021-05-19 08:40:18 +00:00
ENTRYPOINT ["/app/start.sh"]