2024-07-04 09:10:33 -04:00
|
|
|
FROM alpine:latest
|
2023-02-22 15:48:51 -05:00
|
|
|
|
2024-10-14 08:22:05 -04:00
|
|
|
ARG FFPLAYOUT_VERSION=0.24.0-rc3
|
2024-07-04 09:10:33 -04:00
|
|
|
ARG SHARED_STORAGE=false
|
|
|
|
|
|
|
|
ENV DB=/db
|
|
|
|
ENV SHARED_STORAGE=${SHARED_STORAGE}
|
|
|
|
|
|
|
|
COPY README.md ffplayout-v${FFPLAYOUT_VERSION}_x86_64-unknown-linux-musl.tar.* /tmp/
|
2024-07-22 04:34:06 -04:00
|
|
|
|
|
|
|
COPY <<-EOT /run.sh
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ ! -f /db/ffplayout.db ]; then
|
2024-10-21 08:42:55 -04:00
|
|
|
ffplayout -i -u admin -p admin -m contact@example.com --storage "/tv-media" --playlists "/playlists" --public "/public" --logs "/logging" --mail-smtp "mail.example.org" --mail-user "admin@example.org" --mail-password "" --mail-starttls
|
2024-07-22 04:34:06 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
/usr/bin/ffplayout -l "0.0.0.0:8787"
|
|
|
|
EOT
|
2024-07-04 09:10:33 -04:00
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade && \
|
2024-07-22 04:34:06 -04:00
|
|
|
apk add --no-cache ffmpeg sqlite font-dejavu && \
|
|
|
|
chmod +x /run.sh
|
2023-02-22 15:48:51 -05:00
|
|
|
|
2024-07-04 09:10:33 -04:00
|
|
|
RUN [[ -f "/tmp/ffplayout-v${FFPLAYOUT_VERSION}_x86_64-unknown-linux-musl.tar.gz" ]] || \
|
|
|
|
wget -q "https://github.com/ffplayout/ffplayout/releases/download/v${FFPLAYOUT_VERSION}/ffplayout-v${FFPLAYOUT_VERSION}_x86_64-unknown-linux-musl.tar.gz" -P /tmp/ && \
|
|
|
|
cd /tmp && \
|
|
|
|
tar xf "ffplayout-v${FFPLAYOUT_VERSION}_x86_64-unknown-linux-musl.tar.gz" && \
|
|
|
|
cp ffplayout /usr/bin/ && \
|
2024-10-18 08:03:56 -04:00
|
|
|
mkdir -p /usr/share/ffplayout/ && \
|
|
|
|
cp assets/dummy.vtt assets/logo.png assets/DejaVuSans.ttf assets/FONT_LICENSE.txt /usr/share/ffplayout/ && \
|
2024-07-04 09:10:33 -04:00
|
|
|
rm -rf /tmp/* && \
|
|
|
|
mkdir ${DB}
|
|
|
|
|
|
|
|
EXPOSE 8787
|
2023-02-22 15:48:51 -05:00
|
|
|
|
2024-07-10 03:27:52 -04:00
|
|
|
CMD ["/run.sh"]
|