ffplayout/docker/Dockerfile

44 lines
1.9 KiB
Docker
Raw Normal View History

FROM almalinux:9 AS base
2023-02-22 15:48:51 -05:00
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
2023-03-28 04:23:20 -04:00
rm -f /lib/systemd/system/multi-user.target.wants/*; \
rm -f /etc/systemd/system/*.wants/*; \
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
2023-03-28 04:23:20 -04:00
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*
2023-02-22 15:48:51 -05:00
FROM base
2023-02-22 15:48:51 -05:00
2023-12-16 16:57:01 -05:00
ARG FFPLAYOUT_VERSION=0.20.2
COPY README.md *.rpm /tmp/
RUN dnf update -y && \
dnf install -y epel-release && \
dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled crb && \
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm && \
dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm && \
dnf install -y ffmpeg ffmpeg-devel wget dejavu-sans-fonts sudo && \
dnf clean all
RUN [[ -f /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm ]] || wget -q "https://github.com/ffplayout/ffplayout/releases/download/v${FFPLAYOUT_VERSION}/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm" -P /tmp/ && \
dnf install -y /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm && \
rm /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm && \
sed -i "s/User=ffpu/User=root/g" /usr/lib/systemd/system/ffpapi.service && \
sed -i "s/User=ffpu/User=root/g" /usr/lib/systemd/system/ffplayout.service && \
sed -i "s/User=ffpu/User=root/g" /usr/lib/systemd/system/ffplayout@.service && \
systemctl enable ffplayout && \
systemctl enable ffpapi && \
ffpapi -u admin -p admin -m contact@example.com
2023-02-22 15:48:51 -05:00
EXPOSE 8787
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]