This commit is contained in:
jb-alvarado 2023-06-16 12:09:31 +02:00
parent 139868de6d
commit 290a928836
3 changed files with 4 additions and 7 deletions

View File

@ -3,14 +3,14 @@
## Base Image ## Base Image
Use of [centos image](https://hub.docker.com/_/centos) as base image as it offer the possibility to use systemd. Use of [CentOS image](https://hub.docker.com/_/centos) as base image as it offer the possibility to use systemd.
In order to run systemd in a container it has to run in privileged mode and bind to the `cgroup` of the host. In order to run systemd in a container it has to run in privileged mode and bind to the `cgroup` of the host.
## Image ## Image
In addition to the base image, there is the compilation of ffmpeg and all lib from source based on https://github.com/jrottenberg/ffmpeg. In addition to the base image, there is the compilation of ffmpeg and all lib from source based on https://github.com/jrottenberg/ffmpeg.
We can't use directly the image from `jrottenberg/ffmpeg` as it compile ffmpeg with the flag `--enable-small` that remove some part of the json from the ffprobe command. We can't use directly the image from `jrottenberg/ffmpeg` as it compile ffmpeg with the flag `--enable-small` that remove some part of the json from the ffprobe command.
There is also a conf file to override the ffplayout.service as the libs for ffmpeg are not in the defauft place which is copied to `/etc/systemd/system/ffplayout.service.d/overide.conf`. There is also a conf file to override the ffplayout.service as the libs for ffmpeg are not in the default place which is copied to `/etc/systemd/system/ffplayout.service.d/override.conf`.
The image is build with a default user/pass `admin/admin`. The image is build with a default user/pass `admin/admin`.
@ -37,16 +37,13 @@ docker build -t ffplayout-image .
# build ffmpeg from source # build ffmpeg from source
docker build -f fromSource.Dockerfile -t ffplayout-image:from-source . docker build -f fromSource.Dockerfile -t ffplayout-image:from-source .
# build with current almalinux image
docker build -f Almalinux.Dockerfile -t ffplayout-image:almalinux .
``` ```
example of command to start the container: example of command to start the container:
`docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN -p 8787:8787 ffplayout-image` `docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN -p 8787:8787 ffplayout-image`
Note from centos docker hub page Note from CentOS docker hub page
` `
There have been reports that if you're using an Ubuntu host, you will need to add -v /tmp/$(mktemp -d):/run in addition to the cgroups mount. There have been reports that if you're using an Ubuntu host, you will need to add -v /tmp/$(mktemp -d):/run in addition to the cgroups mount.
` `

View File

@ -77,7 +77,7 @@ ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
RUN curl -fsSLO https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 \ RUN curl -fsSLO https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 \
&& tar -xjf ffmpeg-$FFMPEG_VERSION.tar.bz2 \ && tar -xjf ffmpeg-$FFMPEG_VERSION.tar.bz2 \
&& cd ffmpeg-$FFMPEG_VERSION \ && cd ffmpeg-$FFMPEG_VERSION \
&& ./configure --enable-nvenc --enable-libx264 --enable-gpl --enable-libfdk_aac --enable-libx264 --enable-nonfree --enable-postproc --enable-shared --enable-version3 \ && ./configure --enable-nvenc --enable-libx264 --enable-gpl --enable-libfdk_aac --enable-nonfree --enable-postproc --enable-shared --enable-version3 \
&& make -j$(nproc) \ && make -j$(nproc) \
&& make install && make install