cleanup, optional use local rpm file

This commit is contained in:
jb-alvarado 2023-03-28 10:23:20 +02:00
parent 022ee4fddb
commit 46ae4f6460
3 changed files with 35 additions and 47 deletions

View File

@ -5,45 +5,38 @@ RUN dnf -y install libgomp && \
dnf clean all;
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
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*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
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*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*
FROM base
ARG FFPLAYOUT_VERSION=0.17.0-beta7
COPY README.md *.rpm /tmp/
ENV LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib
RUN echo $(ls /tmp/)
ADD ./overide.conf /etc/systemd/system/ffplayout.service.d/overide.conf
ADD ./overide.conf /etc/systemd/system/ffpapi.service.d/overide.conf
RUN dnf install -y epel-release && \
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
dnf install -y ffmpeg ffmpeg-devel wget dejavu-sans-fonts sudo && \
dnf clean all
RUN \
dnf update -y \
&& dnf install -y wget dejavu-sans-fonts sudo \
&& wget -q -O /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm "https://github.com/ffplayout/ffplayout/releases/download/v${FFPLAYOUT_VERSION}/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm" \
&& dnf install -y /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm \
&& dnf clean all \
&& rm /tmp/ffplayout-${FFPLAYOUT_VERSION}-1.x86_64.rpm \
&& mkdir -p /home/ffpu && chown -R ffpu: /home/ffpu \
&& systemctl enable ffplayout \
&& systemctl enable ffpapi \
&& ffpapi -u admin -p admin -m contact@example.com
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 && \
mkdir -p /home/ffpu && chown -R ffpu: /home/ffpu && \
systemctl enable ffplayout && \
systemctl enable ffpapi && \
ffpapi -u admin -p admin -m contact@example.com
EXPOSE 8787

View File

@ -6,20 +6,18 @@ RUN yum -y install libgomp && \
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
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*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*
FROM base AS build
WORKDIR /tmp/workdir
ENV FFMPEG_VERSION=5.1.2 \
AOM_VERSION=v1.0.0 \
LIBASS_VERSION=0.13.7 \
@ -38,7 +36,6 @@ ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64"
RUN buildDeps="autoconf \
automake \
bzip2 \
@ -97,7 +94,6 @@ RUN buildDeps="autoconf \
yum history undo $(yum history info | grep 'Transaction ID' | awk -F: '{print$2}' | tr -d ' ') -y && \
yum autoremove -y
RUN yum -y install \
lame-libs \
openjpeg-libs \
@ -138,6 +134,7 @@ RUN \
make -j $(nproc | awk '{print $1 / 2}') && \
make install && \
rm -rf ${DIR}
## fontconfig https://www.freedesktop.org/wiki/Software/fontconfig/
RUN \
DIR=/tmp/fontconfig && \
@ -149,6 +146,7 @@ RUN \
make -j $(nproc | awk '{print $1 / 2}') && \
make install && \
rm -rf ${DIR}
## libass https://github.com/libass/libass
RUN \
DIR=/tmp/libass && \

View File

@ -5,21 +5,19 @@ RUN yum -y install libgomp && \
yum clean all;
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
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*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
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*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*
FROM base AS build
WORKDIR /tmp/workdir
ENV FFMPEG_VERSION=5.1.2 \
AOM_VERSION=v1.0.0 \
FDKAAC_VERSION=0.1.5 \
@ -57,7 +55,6 @@ ARG PKG_CONFIG_PATH="/opt/ffmpeg/share/pkgconfig:/opt/ffmpeg/lib/pkgconfig:/opt/
ARG PREFIX=/opt/ffmpeg
ARG LD_LIBRARY_PATH="/opt/ffmpeg/lib:/opt/ffmpeg/lib64"
RUN buildDeps="autoconf \
automake \
bzip2 \