From b0f4ae9fc0b524864134748d49e64744a287bfb6 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 4 Jan 2021 02:41:06 +0100 Subject: [PATCH] Migrate away from icedream/nginx to official nginx image. - Update ffmpeg package patch to be compatible with Alpine 3.12. - Update Git URL used to fetch aports repo. --- streamserver/Dockerfile | 19 ++++--- ...non-free-binary-with-fdk-aac-support.patch | 54 +++++-------------- 2 files changed, 27 insertions(+), 46 deletions(-) diff --git a/streamserver/Dockerfile b/streamserver/Dockerfile index e03591b..bb47826 100644 --- a/streamserver/Dockerfile +++ b/streamserver/Dockerfile @@ -1,8 +1,10 @@ -FROM icedream/nginx AS ffmpeg-build +ARG NGINX_VERSION=1.19.2 -RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories -RUN apk update -RUN apk add sudo alpine-sdk git fdk-aac@testing fdk-aac-dev@testing +FROM nginx:${NGINX_VERSION}-alpine AS ffmpeg-build + +# RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories +# RUN apk update +RUN apk add sudo alpine-sdk git fdk-aac fdk-aac-dev # Prepare abuild WORKDIR /usr/src @@ -16,7 +18,7 @@ RUN abuild-keygen -a -i # Check out aports RUN git config --global user.name Docker RUN git config --global user.email "$(whoami)@localhost" -RUN git clone --depth=1 -b $(. /etc/os-release && echo "$VERSION_ID" | grep -o '^[0-9]\+.[0-9]\+')-stable https://gitlab.alpinelinux.org/alpine/aports.git +RUN git clone --depth=1 -b 3.12-stable git://git.alpinelinux.org/aports WORKDIR /usr/src/aports # Apply package changes @@ -40,7 +42,12 @@ RUN git clone --depth=1 --recursive https://github.com/kaltura/nginx-vod-module. ### -FROM icedream/nginx +FROM nginx:${NGINX_VERSION}-alpine +RUN \ + export DEBIAN_FRONTEND=noninteractive &&\ + if command -v apk >/dev/null 2>/dev/null; then apk add --no-cache gnupg; else apt-get update && apt-get install -y gnupg wget ca-certificates && apt-get clean; fi +COPY nginx/rootfs/ / +RUN chmod +x /usr/local/bin/* COPY --from=module-source /usr/src/ /usr/src/nginx-modules/ COPY --from=0 /usr/src/packages/ /packages/ diff --git a/streamserver/patches/aports/0001-Build-non-free-binary-with-fdk-aac-support.patch b/streamserver/patches/aports/0001-Build-non-free-binary-with-fdk-aac-support.patch index 248103a..cd348c8 100644 --- a/streamserver/patches/aports/0001-Build-non-free-binary-with-fdk-aac-support.patch +++ b/streamserver/patches/aports/0001-Build-non-free-binary-with-fdk-aac-support.patch @@ -1,6 +1,6 @@ -From f79a9b7aee7894803aa6a754894a566d19b126ee Mon Sep 17 00:00:00 2001 +From 3d2dec8e6d6fc2b134dc92bfab69afe2adbf1336 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger -Date: Mon, 17 Aug 2020 02:17:15 +0200 +Date: Mon, 14 Sep 2020 03:58:30 +0200 Subject: [PATCH] Build non-free binary with fdk-aac support. --- @@ -18,57 +18,33 @@ diff --git a/community/ffmpeg/APKBUILD b/community/ffmpeg-serverkomplex/APKBUILD similarity index 93% rename from community/ffmpeg/APKBUILD rename to community/ffmpeg-serverkomplex/APKBUILD -index 601dd210831..bf2505beadf 100644 +index 601dd210..32cb9372 100644 --- a/community/ffmpeg/APKBUILD +++ b/community/ffmpeg-serverkomplex/APKBUILD -@@ -2,19 +2,20 @@ - # Contributor: Ɓukasz Jendrysik - # Contributor: Jakub Skrzypnik +@@ -4,3 +4,3 @@ # Maintainer: Natanael Copa -pkgname=ffmpeg -+pkgname="ffmpeg-serverkomplex" ++pkgname=ffmpeg-serverkomplex pkgver=4.3.1 - pkgrel=0 - pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" - url="https://ffmpeg.org/" +@@ -10,3 +10,3 @@ url="https://ffmpeg.org/" arch="all" -license="GPL-2.0-or-later AND LGPL-2.1-or-later" +license="GPL-2.0-or-later AND LGPL-2.1-or-later AND non-free" options="!check" # tests/data/hls-lists.append.m3u8 fails - subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" - makedepends=" - alsa-lib-dev - coreutils - bzip2-dev +@@ -38,2 +38,3 @@ makedepends=" + dav1d-dev + fdk-aac-dev - gnutls-dev - imlib2-dev - lame-dev -@@ -132,6 +133,7 @@ build() { - --enable-gnutls \ - --enable-gpl \ - --enable-libass \ -+ --enable-libfdk-aac \ - --enable-libmp3lame \ - --enable-libvorbis \ - --enable-libvpx \ -@@ -141,6 +143,7 @@ build() { - --enable-libtheora \ - --enable-libv4l2 \ + " +@@ -143,2 +144,4 @@ build() { --enable-libdav1d \ + --enable-nonfree \ ++ --enable-libfdk-aac \ --enable-postproc \ - --enable-pic \ - --enable-pthreads \ -@@ -169,17 +172,28 @@ check() { - } - +@@ -171,2 +174,3 @@ check() { package() { + provides="ffmpeg" make DESTDIR="$pkgdir" install install-man - install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" - # strip --strip-debug "$pkgdir"/usr/lib/*.a - } +@@ -176,5 +180,10 @@ package() { +prepare() { + mv ffmpeg-*/ "${builddir}" @@ -80,8 +56,7 @@ index 601dd210831..bf2505beadf 100644 + replaces="ffmpeg-serverkomplex" + provides="ffmpeg-libs" mkdir -p "$subpkgdir"/usr - mv "$pkgdir"/usr/lib "$subpkgdir"/usr - } +@@ -183,2 +192,7 @@ libs() { +dev() { + provides="ffmpeg-dev" @@ -89,7 +64,6 @@ index 601dd210831..bf2505beadf 100644 +} + sha512sums="64e1052c45145e27726e43d4fe49c9a92058e55562d34fd3b3adf54d3506e6bd680f016b748828215e1bfc8ce19aa85b6f7e4eb05fafe21479118a4ad528a81f ffmpeg-4.3.1.tar.xz - 1047a23eda51b576ac200d5106a1cd318d1d5291643b3a69e025c0a7b6f3dbc9f6eb0e1e6faa231b7e38c8dd4e49a54f7431f87a93664da35825cc2e9e8aedf4 0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch" -- 2.28.0