radio-bullshit/Dockerfile

33 lines
829 B
Docker

# docker build . -t radio-bullshit && docker run --rm -p 8000:8000 -v `pwd`/jingles:/jingles -v `pwd`/songs:/songs radio-bullshit
FROM python:3.9
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y icecast2 ices2
RUN pip install jinja2 j2cli
WORKDIR /config
RUN adduser zambla
COPY icecast.xml.jinja .
COPY ices.xml.jinja .
COPY next_song.py /opt
COPY yt_sync.py /opt
RUN chmod +x /opt/yt_sync.py /opt/next_song.py
RUN mkdir -p /songs /jingles /var/log/icecast
RUN chown -R zambla:zambla /config
RUN chown -R zambla:zambla /opt
RUN chown -R zambla:zambla /songs
RUN chown -R zambla:zambla /jingles
RUN chown -R zambla:zambla /var/log/icecast
RUN chown -R zambla:zambla /usr/share/icecast2
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
ENTRYPOINT [ "/opt/entrypoint.sh" ]