Merge pull request #18 from linuxserver/bin-focal

This commit is contained in:
Adam 2022-06-23 20:26:55 +01:00 committed by GitHub
commit 29e40d18dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1880 additions and 1287 deletions

20
.editorconfig Normal file
View File

@ -0,0 +1,20 @@
# This file is globally distributed to all container image projects from
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# trim_trailing_whitespace may cause unintended issues and should not be globally set true
trim_trailing_whitespace = false
[{Dockerfile*,**.yml}]
indent_style = space
indent_size = 2
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
indent_style = space
indent_size = 4

View File

@ -4,7 +4,7 @@
* While contributing make sure to make all your changes before creating a Pull Request, as our pipeline builds each commit after the PR is open.
* Read, and fill the Pull Request template
* If this is a fix for a typo in code or documentation in the README please file an issue
* If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
* If the PR is addressing an existing issue include, closes #\<issue number>, in the body of the PR commit message
* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn)
@ -24,7 +24,7 @@
## Readme
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-ffmpeg/edit/master/readme-vars.yml).
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-ffmpeg/edit/bin/readme-vars.yml).
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
@ -96,7 +96,7 @@ If you are proposing additional packages to be added, ensure that you added the
### Testing your changes
```
```bash
git clone https://github.com/linuxserver/docker-ffmpeg.git
cd docker-ffmpeg
docker build \
@ -106,15 +106,16 @@ docker build \
```
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
```
```bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
## Update the chagelog
## Update the changelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-ffmpeg/tree/master/root), add an entry to the changelog
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-ffmpeg/tree/bin/root), add an entry to the changelog
```yml
changelogs:

13
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,13 @@
blank_issues_enabled: false
contact_links:
- name: Discord chat support
url: https://discord.gg/YWrKVTn
about: Realtime support / chat with the community and the team.
- name: Discourse discussion forum
url: https://discourse.linuxserver.io
about: Post on our community forum.
- name: Documentation
url: https://docs.linuxserver.io
about: Documentation - information about all of our containers.

40
.github/ISSUE_TEMPLATE/issue.bug.md vendored Normal file
View File

@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
---
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
<!--- Provide a general summary of the bug in the Title above -->
------------------------------
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Environment
**OS:**
**CPU architecture:** x86_64/arm32/arm64
**How docker service was installed:**
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Command used to create docker container (run/create/compose/screenshot)
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
## Docker logs
<!--- Provide a full docker log, output of "docker logs ffmpeg" -->

25
.github/ISSUE_TEMPLATE/issue.feature.md vendored Normal file
View File

@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
---
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- Provide a general summary of the request in the Title above -->
------------------------------
## Desired Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Alternatives Considered
<!--- Tell us what other options you have tried or considered -->

View File

@ -6,7 +6,7 @@
<!--- Before submitting a pull request please check the following -->
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
<!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR -->
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
@ -21,7 +21,7 @@
------------------------------
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-ffmpeg/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-ffmpeg/blob/bin/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
------------------------------

92
.github/workflows/external_trigger.yml vendored Normal file
View File

@ -0,0 +1,92 @@
name: External Trigger Main
on:
workflow_dispatch:
jobs:
external-trigger-bin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: External Trigger
if: github.ref == 'refs/heads/bin'
run: |
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_FFMPEG_BIN }}" ]; then
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_FFMPEG_BIN is set; skipping trigger. ****"
exit 0
fi
echo "**** External trigger running off of bin branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_FFMPEG_BIN\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(echo 4.4)
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for ffmpeg branch bin"
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-ffmpeg/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "**** External version: ${EXT_RELEASE} ****"
echo "**** Retrieving last pushed version ****"
image="linuxserver/ffmpeg"
tag="bin"
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fffmpeg%3Apull" \
| jq -r '.token')
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}" \
| jq -r 'first(.manifests[].digest)')
digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
| jq -r '.config.digest')
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/blobs/${digest}" \
| jq -r '.container_config')
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
if [ -z "${IMAGE_VERSION}" ]; then
echo "**** Can't retrieve last pushed version, exiting ****"
FAILURE_REASON="Can't retrieve last pushed version for ffmpeg tag bin"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ffmpeg/job/bin/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
exit 0
else
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ffmpeg/job/bin/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "**** Attempting to change the Jenkins job description ****"
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"
echo "**** Notifying Discord ****"
TRIGGER_REASON="A version change was detected for ffmpeg tag bin. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
fi

View File

@ -0,0 +1,43 @@
name: External Trigger Scheduler
on:
schedule:
- cron: '25 * * * *'
workflow_dispatch:
jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
with:
fetch-depth: '0'
- name: External Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
echo "**** Pulling the yq docker image ****"
docker pull ghcr.io/linuxserver/yq
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-ffmpeg/${br}/jenkins-vars.yml \
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
if [ "$br" == "$ls_branch" ]; then
echo "**** Branch ${br} appears to be live; checking workflow. ****"
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-ffmpeg/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-ffmpeg/actions/workflows/external_trigger.yml/dispatches
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
fi
else
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
fi
done

View File

@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-ffmpeg/blob/master/.github/ISSUE_TEMPLATE.md)!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-ffmpeg/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-ffmpeg/blob/bin/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-ffmpeg/blob/bin/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-ffmpeg/blob/bin/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

38
.github/workflows/package_trigger.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Package Trigger Main
on:
workflow_dispatch:
jobs:
package-trigger-bin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: Package Trigger
if: github.ref == 'refs/heads/bin'
run: |
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_FFMPEG_BIN }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_FFMPEG_BIN is set; skipping trigger. ****"
exit 0
fi
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ffmpeg/job/bin/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
exit 0
fi
echo "**** Package trigger running off of bin branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_FFMPEG_BIN\". ****"
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-ffmpeg/job/bin/buildWithParameters?PACKAGE_CHECK=true \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "**** Attempting to change the Jenkins job description ****"
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \
--data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--data-urlencode "Submit=Submit"

View File

@ -0,0 +1,50 @@
name: Package Trigger Scheduler
on:
schedule:
- cron: '15 0 * * 2'
workflow_dispatch:
jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
with:
fetch-depth: '0'
- name: Package Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
echo "**** Pulling the yq docker image ****"
docker pull ghcr.io/linuxserver/yq
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-ffmpeg/${br}/jenkins-vars.yml \
| docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch)
if [ "${br}" == "${ls_branch}" ]; then
echo "**** Branch ${br} appears to be live; checking workflow. ****"
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-ffmpeg/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
triggered_branches="${triggered_branches}${br} "
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-ffmpeg/actions/workflows/package_trigger.yml/dispatches
sleep 30
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
fi
else
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
fi
done
echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****"
echo "**** Notifying Discord ****"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Package Check Build(s) Triggered for ffmpeg** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-ffmpeg/activity/"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
- uses: actions/stale@v3
with:
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."

File diff suppressed because it is too large Load Diff

View File

@ -1,433 +1,433 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic as buildstage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal as buildstage
# set version label
ARG FFMPEG_VERSION
# common env
ENV \
DEBIAN_FRONTEND="noninteractive" \
MAKEFLAGS="-j4"
DEBIAN_FRONTEND="noninteractive" \
MAKEFLAGS="-j4"
# versions
ENV \
AOM=v1.0.0 \
FDKAAC=2.0.1 \
FFMPEG_HARD=4.4 \
FREETYPE=2.9.1 \
FRIBIDI=1.0.8 \
KVAZAAR=2.0.0 \
LAME=3.100 \
LIBASS=0.14.0 \
LIBDRM=2.4.98 \
LIBVA=2.6.0 \
LIBVDPAU=1.2 \
LIBVIDSTAB=1.1.0 \
NVCODEC=n9.1.23.1 \
OGG=1.3.4 \
OPENCOREAMR=0.1.5 \
OPENJPEG=2.3.1 \
OPUS=1.3 \
THEORA=1.1.1 \
VORBIS=1.3.6 \
VPX=1.10.0 \
X265=3.3 \
XVID=1.3.7
AOM=v1.0.0 \
FDKAAC=2.0.1 \
FFMPEG_HARD=4.4 \
FREETYPE=2.9.1 \
FRIBIDI=1.0.8 \
KVAZAAR=2.0.0 \
LAME=3.100 \
LIBASS=0.14.0 \
LIBDRM=2.4.98 \
LIBVA=2.6.0 \
LIBVDPAU=1.2 \
LIBVIDSTAB=1.1.0 \
NVCODEC=n9.1.23.1 \
OGG=1.3.4 \
OPENCOREAMR=0.1.5 \
OPENJPEG=2.3.1 \
OPUS=1.3 \
THEORA=1.1.1 \
VORBIS=1.3.6 \
VPX=1.10.0 \
X265=3.3 \
XVID=1.3.7
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
autoconf \
automake \
bzip2 \
ca-certificates \
cmake \
curl \
diffutils \
g++ \
gcc \
git \
gperf \
libexpat1-dev \
libfontconfig1-dev \
libxext-dev \
libgcc-7-dev \
libgomp1 \
libpciaccess-dev \
libssl-dev \
libtool \
libv4l-dev \
libx11-dev \
libxml2-dev \
make \
nasm \
perl \
pkg-config \
python \
x11proto-xext-dev \
xserver-xorg-dev \
yasm \
zlib1g-dev
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
autoconf \
automake \
bzip2 \
ca-certificates \
cmake \
curl \
diffutils \
g++ \
gcc \
git \
gperf \
libexpat1-dev \
libfontconfig1-dev \
libxext-dev \
libgcc-7-dev \
libgomp1 \
libpciaccess-dev \
libssl-dev \
libtool \
libv4l-dev \
libx11-dev \
libxml2-dev \
make \
nasm \
perl \
pkg-config \
python \
x11proto-xext-dev \
xserver-xorg-dev \
yasm \
zlib1g-dev
# compile 3rd party libs
RUN \
echo "**** grabbing aom ****" && \
mkdir -p /tmp/aom && \
git clone \
--branch ${AOM} \
--depth 1 https://aomedia.googlesource.com/aom \
/tmp/aom
echo "**** grabbing aom ****" && \
mkdir -p /tmp/aom && \
git clone \
--branch ${AOM} \
--depth 1 https://aomedia.googlesource.com/aom \
/tmp/aom
RUN \
echo "**** compiling aom ****" && \
cd /tmp/aom && \
rm -rf \
CMakeCache.txt \
CMakeFiles && \
mkdir -p \
aom_build && \
cd aom_build && \
cmake \
-DBUILD_STATIC_LIBS=0 .. && \
make && \
make install
echo "**** compiling aom ****" && \
cd /tmp/aom && \
rm -rf \
CMakeCache.txt \
CMakeFiles && \
mkdir -p \
aom_build && \
cd aom_build && \
cmake \
-DBUILD_STATIC_LIBS=0 .. && \
make && \
make install
RUN \
echo "**** grabbing fdk-aac ****" && \
mkdir -p /tmp/fdk-aac && \
curl -Lf \
https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fdk-aac
echo "**** grabbing fdk-aac ****" && \
mkdir -p /tmp/fdk-aac && \
curl -Lf \
https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fdk-aac
RUN \
echo "**** compiling fdk-aac ****" && \
cd /tmp/fdk-aac && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling fdk-aac ****" && \
cd /tmp/fdk-aac && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing freetype ****" && \
mkdir -p /tmp/freetype && \
curl -Lf \
https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/freetype
echo "**** grabbing freetype ****" && \
mkdir -p /tmp/freetype && \
curl -Lf \
https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/freetype
RUN \
echo "**** compiling freetype ****" && \
cd /tmp/freetype && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling freetype ****" && \
cd /tmp/freetype && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
curl -Lf \
https://github.com/fribidi/fribidi/archive/v${FRIBIDI}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fribidi
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
curl -Lf \
https://github.com/fribidi/fribidi/archive/v${FRIBIDI}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fribidi
RUN \
echo "**** compiling fribidi ****" && \
cd /tmp/fribidi && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
echo "**** compiling fribidi ****" && \
cd /tmp/fribidi && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
RUN \
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
curl -Lf \
https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/kvazaar
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
curl -Lf \
https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/kvazaar
RUN \
echo "**** compiling kvazaar ****" && \
cd /tmp/kvazaar && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling kvazaar ****" && \
cd /tmp/kvazaar && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
curl -Lf \
http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/lame
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
curl -Lf \
http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/lame
RUN \
echo "**** compiling lame ****" && \
cd /tmp/lame && \
cp \
/usr/share/automake-1.15/config.guess \
config.guess && \
cp \
/usr/share/automake-1.15/config.sub \
config.sub && \
./configure \
--disable-frontend \
--disable-static \
--enable-nasm \
--enable-shared && \
make && \
make install
echo "**** compiling lame ****" && \
cd /tmp/lame && \
cp \
/usr/share/automake-1.16/config.guess \
config.guess && \
cp \
/usr/share/automake-1.16/config.sub \
config.sub && \
./configure \
--disable-frontend \
--disable-static \
--enable-nasm \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing libass ****" && \
mkdir -p /tmp/libass && \
curl -Lf \
https://github.com/libass/libass/archive/${LIBASS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/libass
echo "**** grabbing libass ****" && \
mkdir -p /tmp/libass && \
curl -Lf \
https://github.com/libass/libass/archive/${LIBASS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/libass
RUN \
echo "**** compiling libass ****" && \
cd /tmp/libass && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling libass ****" && \
cd /tmp/libass && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing ogg ****" && \
mkdir -p /tmp/ogg && \
curl -Lf \
http://downloads.xiph.org/releases/ogg/libogg-${OGG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/ogg
echo "**** grabbing ogg ****" && \
mkdir -p /tmp/ogg && \
curl -Lf \
http://downloads.xiph.org/releases/ogg/libogg-${OGG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/ogg
RUN \
echo "**** compiling ogg ****" && \
cd /tmp/ogg && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling ogg ****" && \
cd /tmp/ogg && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing opencore-amr ****" && \
mkdir -p /tmp/opencore-amr && \
curl -Lf \
http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opencore-amr
echo "**** grabbing opencore-amr ****" && \
mkdir -p /tmp/opencore-amr && \
curl -Lf \
http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opencore-amr
RUN \
echo "**** compiling opencore-amr ****" && \
cd /tmp/opencore-amr && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling opencore-amr ****" && \
cd /tmp/opencore-amr && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
curl -Lf \
https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/openjpeg
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
curl -Lf \
https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/openjpeg
RUN \
echo "**** compiling openjpeg ****" && \
cd /tmp/openjpeg && \
rm -Rf \
thirdparty/libpng/* && \
curl -Lf \
https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz | \
tar -zx --strip-components=1 -C thirdparty/libpng/ && \
cmake \
-DBUILD_STATIC_LIBS=0 \
-DBUILD_THIRDPARTY:BOOL=ON . && \
make && \
make install
echo "**** compiling openjpeg ****" && \
cd /tmp/openjpeg && \
rm -Rf \
thirdparty/libpng/* && \
curl -Lf \
https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz | \
tar -zx --strip-components=1 -C thirdparty/libpng/ && \
cmake \
-DBUILD_STATIC_LIBS=0 \
-DBUILD_THIRDPARTY:BOOL=ON . && \
make && \
make install
RUN \
echo "**** grabbing opus ****" && \
mkdir -p /tmp/opus && \
curl -Lf \
https://archive.mozilla.org/pub/opus/opus-${OPUS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opus
echo "**** grabbing opus ****" && \
mkdir -p /tmp/opus && \
curl -Lf \
https://archive.mozilla.org/pub/opus/opus-${OPUS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opus
RUN \
echo "**** compiling opus ****" && \
cd /tmp/opus && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling opus ****" && \
cd /tmp/opus && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing theora ****" && \
mkdir -p /tmp/theora && \
curl -Lf \
http://downloads.xiph.org/releases/theora/libtheora-${THEORA}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/theora
echo "**** grabbing theora ****" && \
mkdir -p /tmp/theora && \
curl -Lf \
http://downloads.xiph.org/releases/theora/libtheora-${THEORA}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/theora
RUN \
echo "**** compiling theora ****" && \
cd /tmp/theora && \
cp \
/usr/share/automake-1.15/config.guess \
config.guess && \
cp \
/usr/share/automake-1.15/config.sub \
config.sub && \
curl -fL \
'https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff' \
> png.patch && \
patch ./examples/png2theora.c < png.patch && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling theora ****" && \
cd /tmp/theora && \
cp \
/usr/share/automake-1.16/config.guess \
config.guess && \
cp \
/usr/share/automake-1.16/config.sub \
config.sub && \
curl -fL \
'https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff' \
> png.patch && \
patch ./examples/png2theora.c < png.patch && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing vid.stab ****" && \
mkdir -p /tmp/vid.stab && \
curl -Lf \
https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vid.stab
echo "**** grabbing vid.stab ****" && \
mkdir -p /tmp/vid.stab && \
curl -Lf \
https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vid.stab
RUN \
echo "**** compiling vid.stab ****" && \
cd /tmp/vid.stab && \
echo "" > \
CMakeModules/FindSSE.cmake && \
cmake . && \
make && \
make install
echo "**** compiling vid.stab ****" && \
cd /tmp/vid.stab && \
echo "" > \
CMakeModules/FindSSE.cmake && \
cmake . && \
make && \
make install
RUN \
echo "**** grabbing vorbis ****" && \
mkdir -p /tmp/vorbis && \
curl -Lf \
http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vorbis
echo "**** grabbing vorbis ****" && \
mkdir -p /tmp/vorbis && \
curl -Lf \
http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vorbis
RUN \
echo "**** compiling vorbis ****" && \
cd /tmp/vorbis && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling vorbis ****" && \
cd /tmp/vorbis && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing vpx ****" && \
mkdir -p /tmp/vpx && \
curl -Lf \
https://github.com/webmproject/libvpx/archive/v${VPX}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vpx
echo "**** grabbing vpx ****" && \
mkdir -p /tmp/vpx && \
curl -Lf \
https://github.com/webmproject/libvpx/archive/v${VPX}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vpx
RUN \
echo "**** compiling vpx ****" && \
cd /tmp/vpx && \
./configure \
--disable-debug \
--disable-docs \
--disable-examples \
--disable-install-bins \
--disable-static \
--disable-unit-tests \
--enable-pic \
--enable-shared \
--enable-vp8 \
--enable-vp9 \
--enable-vp9-highbitdepth && \
make && \
make install
echo "**** compiling vpx ****" && \
cd /tmp/vpx && \
./configure \
--disable-debug \
--disable-docs \
--disable-examples \
--disable-install-bins \
--disable-static \
--disable-unit-tests \
--enable-pic \
--enable-shared \
--enable-vp8 \
--enable-vp9 \
--enable-vp9-highbitdepth && \
make && \
make install
RUN \
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
curl -Lf \
https://code.videolan.org/videolan/x264/-/archive/master/x264-stable.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/x264
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
curl -Lf \
https://code.videolan.org/videolan/x264/-/archive/master/x264-stable.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/x264
RUN \
echo "**** compiling x264 ****" && \
cd /tmp/x264 && \
./configure \
--disable-cli \
--disable-static \
--enable-pic \
--enable-shared && \
make && \
make install
echo "**** compiling x264 ****" && \
cd /tmp/x264 && \
./configure \
--disable-cli \
--disable-static \
--enable-pic \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing x265 ****" && \
mkdir -p /tmp/x265 && \
curl -Lf \
https://github.com/videolan/x265/archive/refs/tags/${X265}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/x265
echo "**** grabbing x265 ****" && \
mkdir -p /tmp/x265 && \
curl -Lf \
https://github.com/videolan/x265/archive/refs/tags/${X265}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/x265
RUN \
echo "**** compiling x265 ****" && \
cd /tmp/x265/build/linux && \
export CXXFLAGS="-fPIC" && \
./multilib.sh && \
make -C 8bit install
echo "**** compiling x265 ****" && \
cd /tmp/x265/build/linux && \
export CXXFLAGS="-fPIC" && \
./multilib.sh && \
make -C 8bit install
RUN \
echo "**** grabbing xvid ****" && \
mkdir -p /tmp/xvid && \
curl -Lf \
https://downloads.xvid.com/downloads/xvidcore-${XVID}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/xvid
echo "**** grabbing xvid ****" && \
mkdir -p /tmp/xvid && \
curl -Lf \
https://downloads.xvid.com/downloads/xvidcore-${XVID}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/xvid
RUN \
echo "**** compiling xvid ****" && \
cd /tmp/xvid/build/generic && \
./configure && \
make && \
make install
echo "**** compiling xvid ****" && \
cd /tmp/xvid/build/generic && \
./configure && \
make && \
make install
# main ffmpeg build
RUN \
echo "**** Versioning ****" && \
if [ -z ${FFMPEG_VERSION+x} ]; then \
FFMPEG=${FFMPEG_HARD}; \
else \
FFMPEG=${FFMPEG_VERSION}; \
fi && \
echo "**** grabbing ffmpeg ****" && \
mkdir -p /tmp/ffmpeg && \
echo "https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2" && \
curl -Lf \
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/ffmpeg
echo "**** Versioning ****" && \
if [ -z ${FFMPEG_VERSION+x} ]; then \
FFMPEG=${FFMPEG_HARD}; \
else \
FFMPEG=${FFMPEG_VERSION}; \
fi && \
echo "**** grabbing ffmpeg ****" && \
mkdir -p /tmp/ffmpeg && \
echo "https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2" && \
curl -Lf \
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/ffmpeg
RUN \
echo "**** compiling ffmpeg ****" && \
cd /tmp/ffmpeg && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-ffprobe \
--enable-avresample \
--enable-gpl \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopenjpeg \
--enable-libopus \
--enable-libtheora \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvorbis \
--enable-libvpx \
--enable-libxml2 \
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
--enable-small \
--enable-stripping \
--enable-version3 && \
make
echo "**** compiling ffmpeg ****" && \
cd /tmp/ffmpeg && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-ffprobe \
--enable-avresample \
--enable-gpl \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopenjpeg \
--enable-libopus \
--enable-libtheora \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvorbis \
--enable-libvpx \
--enable-libxml2 \
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
--enable-small \
--enable-stripping \
--enable-version3 && \
make
RUN \
echo "**** arrange files ****" && \
ldconfig && \
mkdir -p /buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffmpeg \
/buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
mkdir -p /buildout/usr/lib && \
ldd /tmp/ffmpeg/ffmpeg \
| awk '/local/ {print $3}' \
| xargs -i cp -L {} /buildout/usr/lib/
echo "**** arrange files ****" && \
ldconfig && \
mkdir -p /buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffmpeg \
/buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
mkdir -p /buildout/usr/lib && \
ldd /tmp/ffmpeg/ffmpeg \
| awk '/local/ {print $3}' \
| xargs -i cp -L {} /buildout/usr/lib/
# Storage layer consumed downstream
FROM scratch

View File

@ -1,443 +1,443 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic as buildstage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal as buildstage
# set version label
ARG FFMPEG_VERSION
# common env
ENV \
DEBIAN_FRONTEND="noninteractive" \
MAKEFLAGS="-j4"
DEBIAN_FRONTEND="noninteractive" \
MAKEFLAGS="-j4"
# versions
ENV \
AOM=v1.0.0 \
FDKAAC=2.0.1 \
FFMPEG_HARD=4.4 \
FREETYPE=2.9.1 \
FRIBIDI=1.0.8 \
KVAZAAR=2.0.0 \
LAME=3.100 \
LIBASS=0.14.0 \
LIBDRM=2.4.98 \
LIBVA=2.6.0 \
LIBVDPAU=1.2 \
LIBVIDSTAB=1.1.0 \
NVCODEC=n9.1.23.1 \
OGG=1.3.4 \
OPENCOREAMR=0.1.5 \
OPENJPEG=2.3.1 \
OPUS=1.3 \
THEORA=1.1.1 \
VORBIS=1.3.6 \
VPX=1.10.0 \
X265=3.4 \
XVID=1.3.7
AOM=v1.0.0 \
FDKAAC=2.0.1 \
FFMPEG_HARD=4.4 \
FREETYPE=2.9.1 \
FRIBIDI=1.0.8 \
KVAZAAR=2.0.0 \
LAME=3.100 \
LIBASS=0.14.0 \
LIBDRM=2.4.98 \
LIBVA=2.6.0 \
LIBVDPAU=1.2 \
LIBVIDSTAB=1.1.0 \
NVCODEC=n9.1.23.1 \
OGG=1.3.4 \
OPENCOREAMR=0.1.5 \
OPENJPEG=2.3.1 \
OPUS=1.3 \
THEORA=1.1.1 \
VORBIS=1.3.6 \
VPX=1.10.0 \
X265=3.4 \
XVID=1.3.7
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
autoconf \
automake \
bzip2 \
ca-certificates \
cmake \
curl \
diffutils \
g++ \
gcc \
git \
gperf \
libexpat1-dev \
libfontconfig1-dev \
libxext-dev \
libgcc-7-dev \
libgomp1 \
libpciaccess-dev \
libssl-dev \
libtool \
libv4l-dev \
libx11-dev \
libxml2-dev \
make \
nasm \
perl \
pkg-config \
python \
x11proto-xext-dev \
xserver-xorg-dev \
yasm \
zlib1g-dev
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
autoconf \
automake \
bzip2 \
ca-certificates \
cmake \
curl \
diffutils \
g++ \
gcc \
git \
gperf \
libexpat1-dev \
libfontconfig1-dev \
libxext-dev \
libgcc-7-dev \
libgomp1 \
libpciaccess-dev \
libssl-dev \
libtool \
libv4l-dev \
libx11-dev \
libxml2-dev \
make \
nasm \
perl \
pkg-config \
python \
x11proto-xext-dev \
xserver-xorg-dev \
yasm \
zlib1g-dev
# compile 3rd party libs
RUN \
echo "**** grabbing aom ****" && \
mkdir -p /tmp/aom && \
git clone \
--branch ${AOM} \
--depth 1 https://aomedia.googlesource.com/aom \
/tmp/aom
echo "**** grabbing aom ****" && \
mkdir -p /tmp/aom && \
git clone \
--branch ${AOM} \
--depth 1 https://aomedia.googlesource.com/aom \
/tmp/aom
RUN \
echo "**** compiling aom ****" && \
cd /tmp/aom && \
rm -rf \
CMakeCache.txt \
CMakeFiles && \
mkdir -p \
aom_build && \
cd aom_build && \
cmake \
-DAOM_TARGET_CPU=generic \
-DBUILD_STATIC_LIBS=0 .. && \
make && \
make install
echo "**** compiling aom ****" && \
cd /tmp/aom && \
rm -rf \
CMakeCache.txt \
CMakeFiles && \
mkdir -p \
aom_build && \
cd aom_build && \
cmake \
-DAOM_TARGET_CPU=generic \
-DBUILD_STATIC_LIBS=0 .. && \
make && \
make install
RUN \
echo "**** grabbing fdk-aac ****" && \
mkdir -p /tmp/fdk-aac && \
curl -Lf \
https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fdk-aac
echo "**** grabbing fdk-aac ****" && \
mkdir -p /tmp/fdk-aac && \
curl -Lf \
https://github.com/mstorsjo/fdk-aac/archive/v${FDKAAC}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fdk-aac
RUN \
echo "**** compiling fdk-aac ****" && \
cd /tmp/fdk-aac && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling fdk-aac ****" && \
cd /tmp/fdk-aac && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing freetype ****" && \
mkdir -p /tmp/freetype && \
curl -Lf \
https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/freetype
RUN \
echo "**** grabbing freetype ****" && \
mkdir -p /tmp/freetype && \
curl -Lf \
https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/freetype
echo "**** compiling freetype ****" && \
cd /tmp/freetype && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
curl -Lf \
https://github.com/fribidi/fribidi/archive/v${FRIBIDI}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fribidi
RUN \
echo "**** compiling freetype ****" && \
cd /tmp/freetype && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling fribidi ****" && \
cd /tmp/fribidi && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
RUN \
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
curl -Lf \
https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/kvazaar
RUN \
echo "**** compiling kvazaar ****" && \
cd /tmp/kvazaar && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
curl -Lf \
https://github.com/fribidi/fribidi/archive/v${FRIBIDI}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fribidi
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
curl -Lf \
http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/lame
RUN \
echo "**** compiling fribidi ****" && \
cd /tmp/fribidi && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
echo "**** compiling lame ****" && \
cd /tmp/lame && \
cp \
/usr/share/automake-1.16/config.guess \
config.guess && \
cp \
/usr/share/automake-1.16/config.sub \
config.sub && \
./configure \
--disable-frontend \
--disable-static \
--enable-nasm \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
curl -Lf \
https://github.com/ultravideo/kvazaar/archive/v${KVAZAAR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/kvazaar
echo "**** grabbing libass ****" && \
mkdir -p /tmp/libass && \
curl -Lf \
https://github.com/libass/libass/archive/${LIBASS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/libass
RUN \
echo "**** compiling kvazaar ****" && \
cd /tmp/kvazaar && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling libass ****" && \
cd /tmp/libass && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
curl -Lf \
http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/lame
echo "**** grabbing ogg ****" && \
mkdir -p /tmp/ogg && \
curl -Lf \
http://downloads.xiph.org/releases/ogg/libogg-${OGG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/ogg
RUN \
echo "**** compiling lame ****" && \
cd /tmp/lame && \
cp \
/usr/share/automake-1.15/config.guess \
config.guess && \
cp \
/usr/share/automake-1.15/config.sub \
config.sub && \
./configure \
--disable-frontend \
--disable-static \
--enable-nasm \
--enable-shared && \
make && \
make install
echo "**** compiling ogg ****" && \
cd /tmp/ogg && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing libass ****" && \
mkdir -p /tmp/libass && \
curl -Lf \
https://github.com/libass/libass/archive/${LIBASS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/libass
echo "**** grabbing opencore-amr ****" && \
mkdir -p /tmp/opencore-amr && \
curl -Lf \
http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opencore-amr
RUN \
echo "**** compiling libass ****" && \
cd /tmp/libass && \
./autogen.sh && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling opencore-amr ****" && \
cd /tmp/opencore-amr && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing ogg ****" && \
mkdir -p /tmp/ogg && \
curl -Lf \
http://downloads.xiph.org/releases/ogg/libogg-${OGG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/ogg
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
curl -Lf \
https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/openjpeg
RUN \
echo "**** compiling ogg ****" && \
cd /tmp/ogg && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling openjpeg ****" && \
cd /tmp/openjpeg && \
rm -Rf \
thirdparty/libpng/* && \
curl -Lf \
https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz | \
tar -zx --strip-components=1 -C thirdparty/libpng/ && \
cmake \
-DBUILD_STATIC_LIBS=0 \
-DBUILD_THIRDPARTY:BOOL=ON . && \
make && \
make install
RUN \
echo "**** grabbing opencore-amr ****" && \
mkdir -p /tmp/opencore-amr && \
curl -Lf \
http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${OPENCOREAMR}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opencore-amr
echo "**** grabbing opus ****" && \
mkdir -p /tmp/opus && \
curl -Lf \
https://archive.mozilla.org/pub/opus/opus-${OPUS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opus
RUN \
echo "**** compiling opencore-amr ****" && \
cd /tmp/opencore-amr && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling opus ****" && \
cd /tmp/opus && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
curl -Lf \
https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/openjpeg
echo "**** grabbing theora ****" && \
mkdir -p /tmp/theora && \
curl -Lf \
http://downloads.xiph.org/releases/theora/libtheora-${THEORA}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/theora
RUN \
echo "**** compiling openjpeg ****" && \
cd /tmp/openjpeg && \
rm -Rf \
thirdparty/libpng/* && \
curl -Lf \
https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz | \
tar -zx --strip-components=1 -C thirdparty/libpng/ && \
cmake \
-DBUILD_STATIC_LIBS=0 \
-DBUILD_THIRDPARTY:BOOL=ON . && \
make && \
make install
echo "**** compiling theora ****" && \
cd /tmp/theora && \
cp \
/usr/share/automake-1.16/config.guess \
config.guess && \
cp \
/usr/share/automake-1.16/config.sub \
config.sub && \
curl -fL \
'https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff' \
> png.patch && \
patch ./examples/png2theora.c < png.patch && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing opus ****" && \
mkdir -p /tmp/opus && \
curl -Lf \
https://archive.mozilla.org/pub/opus/opus-${OPUS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/opus
echo "**** grabbing vid.stab ****" && \
mkdir -p /tmp/vid.stab && \
curl -Lf \
https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vid.stab
RUN \
echo "**** compiling opus ****" && \
cd /tmp/opus && \
autoreconf -fiv && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling vid.stab ****" && \
cd /tmp/vid.stab && \
echo "" > \
CMakeModules/FindSSE.cmake && \
cmake . && \
make && \
make install
RUN \
echo "**** grabbing theora ****" && \
mkdir -p /tmp/theora && \
curl -Lf \
http://downloads.xiph.org/releases/theora/libtheora-${THEORA}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/theora
echo "**** grabbing vorbis ****" && \
mkdir -p /tmp/vorbis && \
curl -Lf \
http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vorbis
RUN \
echo "**** compiling theora ****" && \
cd /tmp/theora && \
cp \
/usr/share/automake-1.15/config.guess \
config.guess && \
cp \
/usr/share/automake-1.15/config.sub \
config.sub && \
curl -fL \
'https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff' \
> png.patch && \
patch ./examples/png2theora.c < png.patch && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling vorbis ****" && \
cd /tmp/vorbis && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing vid.stab ****" && \
mkdir -p /tmp/vid.stab && \
curl -Lf \
https://github.com/georgmartius/vid.stab/archive/v${LIBVIDSTAB}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vid.stab
echo "**** grabbing vpx ****" && \
mkdir -p /tmp/vpx && \
curl -Lf \
https://github.com/webmproject/libvpx/archive/v${VPX}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vpx
RUN \
echo "**** compiling vid.stab ****" && \
cd /tmp/vid.stab && \
echo "" > \
CMakeModules/FindSSE.cmake && \
cmake . && \
make && \
make install
echo "**** compiling vpx ****" && \
cd /tmp/vpx && \
LDFLAGS=-mfloat-abi=hard ./configure \
--disable-debug \
--disable-docs \
--disable-examples \
--disable-install-bins \
--disable-static \
--disable-unit-tests \
--enable-pic \
--enable-shared \
--enable-vp8 \
--enable-vp9 \
--enable-vp9-highbitdepth \
--extra-cflags="-mfloat-abi=hard" \
--extra-cxxflags="-mfloat-abi=hard" && \
make && \
make install
RUN \
echo "**** grabbing vorbis ****" && \
mkdir -p /tmp/vorbis && \
curl -Lf \
http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vorbis
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
curl -Lf \
https://code.videolan.org/videolan/x264/-/archive/master/x264-stable.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/x264
RUN \
echo "**** compiling vorbis ****" && \
cd /tmp/vorbis && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install
echo "**** compiling x264 ****" && \
cd /tmp/x264 && \
./configure \
--disable-cli \
--disable-static \
--enable-pic \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing vpx ****" && \
mkdir -p /tmp/vpx && \
curl -Lf \
https://github.com/webmproject/libvpx/archive/v${VPX}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/vpx
echo "**** grabbing x265 ****" && \
mkdir -p /tmp/x265 && \
curl -Lf \
http://anduin.linuxfromscratch.org/BLFS/x265/x265_${X265}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/x265
RUN \
echo "**** compiling vpx ****" && \
cd /tmp/vpx && \
LDFLAGS=-mfloat-abi=hard ./configure \
--disable-debug \
--disable-docs \
--disable-examples \
--disable-install-bins \
--disable-static \
--disable-unit-tests \
--enable-pic \
--enable-shared \
--enable-vp8 \
--enable-vp9 \
--enable-vp9-highbitdepth \
--extra-cflags="-mfloat-abi=hard" \
--extra-cxxflags="-mfloat-abi=hard" && \
make && \
make install
echo "**** compiling x265 ****" && \
cd /tmp/x265/build/linux && \
curl -fL \
https://sources.debian.org/data/main/x/x265/3.4-2/debian/patches/0001-Fix-arm-flags.patch \
> arm.patch && \
patch ../../source/CMakeLists.txt < arm.patch && \
cmake \
-D ENABLE_ASSEMBLY=OFF \
-D ENABLE_CLI=OFF \
-G "Unix Makefiles" ../../source && \
make && \
make install
RUN \
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
curl -Lf \
https://code.videolan.org/videolan/x264/-/archive/master/x264-stable.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/x264
RUN \
echo "**** compiling x264 ****" && \
cd /tmp/x264 && \
./configure \
--disable-cli \
--disable-static \
--enable-pic \
--enable-shared && \
make && \
make install
RUN \
echo "**** grabbing x265 ****" && \
mkdir -p /tmp/x265 && \
curl -Lf \
http://anduin.linuxfromscratch.org/BLFS/x265/x265_${X265}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/x265
RUN \
echo "**** compiling x265 ****" && \
cd /tmp/x265/build/linux && \
curl -fL \
https://sources.debian.org/data/main/x/x265/3.4-2/debian/patches/0001-Fix-arm-flags.patch \
> arm.patch && \
patch ../../source/CMakeLists.txt < arm.patch && \
cmake \
-D ENABLE_ASSEMBLY=OFF \
-D ENABLE_CLI=OFF \
-G "Unix Makefiles" ../../source && \
make && \
make install
RUN \
echo "**** grabbing xvid ****" && \
mkdir -p /tmp/xvid && \
curl -Lf \
https://downloads.xvid.com/downloads/xvidcore-${XVID}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/xvid
RUN \
echo "**** compiling xvid ****" && \
cd /tmp/xvid/build/generic && \
./configure && \
make && \
make install
echo "**** grabbing xvid ****" && \
mkdir -p /tmp/xvid && \
curl -Lf \
https://downloads.xvid.com/downloads/xvidcore-${XVID}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/xvid
RUN \
echo "**** compiling xvid ****" && \
cd /tmp/xvid/build/generic && \
./configure && \
make && \
make install
# main ffmpeg build
RUN \
echo "**** Versioning ****" && \
if [ -z ${FFMPEG_VERSION+x} ]; then \
FFMPEG=${FFMPEG_HARD}; \
else \
FFMPEG=${FFMPEG_VERSION}; \
fi && \
echo "**** grabbing ffmpeg ****" && \
mkdir -p /tmp/ffmpeg && \
echo "https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2" && \
curl -Lf \
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/ffmpeg
echo "**** Versioning ****" && \
if [ -z ${FFMPEG_VERSION+x} ]; then \
FFMPEG=${FFMPEG_HARD}; \
else \
FFMPEG=${FFMPEG_VERSION}; \
fi && \
echo "**** grabbing ffmpeg ****" && \
mkdir -p /tmp/ffmpeg && \
echo "https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2" && \
curl -Lf \
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
tar -jx --strip-components=1 -C /tmp/ffmpeg
RUN \
echo "**** compiling ffmpeg ****" && \
cd /tmp/ffmpeg && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-ffprobe \
--enable-avresample \
--enable-gpl \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopenjpeg \
--enable-libopus \
--enable-libtheora \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvorbis \
--enable-libvpx \
--enable-libxml2 \
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
--enable-small \
--enable-stripping \
--enable-version3 && \
make
echo "**** compiling ffmpeg ****" && \
cd /tmp/ffmpeg && \
./configure \
--disable-debug \
--disable-doc \
--disable-ffplay \
--enable-ffprobe \
--enable-avresample \
--enable-gpl \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libopenjpeg \
--enable-libopus \
--enable-libtheora \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvorbis \
--enable-libvpx \
--enable-libxml2 \
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-nonfree \
--enable-openssl \
--enable-small \
--enable-stripping \
--enable-version3 && \
make
RUN \
echo "**** arrange files ****" && \
ldconfig && \
mkdir -p /buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffmpeg \
/buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
mkdir -p /buildout/usr/lib && \
ldd /tmp/ffmpeg/ffmpeg \
| awk '/local/ {print $3}' \
| xargs -i cp -L {} /buildout/usr/lib/
echo "**** arrange files ****" && \
ldconfig && \
mkdir -p /buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffmpeg \
/buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
mkdir -p /buildout/usr/lib && \
ldd /tmp/ffmpeg/ffmpeg \
| awk '/local/ {print $3}' \
| xargs -i cp -L {} /buildout/usr/lib/
# Storage layer consumed downstream
FROM scratch

352
Jenkinsfile vendored
View File

@ -16,6 +16,7 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key')
BUILD_VERSION_ARG = 'FFMPEG_VERSION'
LS_USER = 'linuxserver'
LS_REPO = 'docker-ffmpeg'
@ -48,7 +49,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings.yml ./.github/workflows/stale.yml'
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
}
script{
env.LS_RELEASE_NUMBER = sh(
@ -109,6 +110,30 @@ pipeline {
env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
returnStdout: true).trim()
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
if (semver.find()) {
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
} else {
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/
if (semver.find()) {
if (semver[0][3]) {
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
} else if (!semver[0][3] && !semver[0][4]) {
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${(new Date()).format('YYYYMMdd')}"
}
}
}
if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
}
println("SEMVER: ${env.SEMVER}")
} else {
println("No SEMVER detected")
}
}
}
}
@ -123,13 +148,15 @@ pipeline {
env.IMAGE = env.DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'amd64-bin-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-bin-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-bin-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.CI_TAGS = 'bin-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.META_TAG = 'bin-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
env.EXT_RELEASE_TAG = 'bin-version-' + env.EXT_RELEASE_CLEAN
}
}
}
@ -144,13 +171,15 @@ pipeline {
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 'amd64-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.CI_TAGS = 'bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.META_TAG = 'bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.EXT_RELEASE_TAG = 'bin-version-' + env.EXT_RELEASE_CLEAN
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
}
}
@ -165,13 +194,15 @@ pipeline {
env.IMAGE = env.PR_DOCKERHUB_IMAGE
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 'amd64-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CI_TAGS = 'bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
}
env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.META_TAG = 'bin-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.EXT_RELEASE_TAG = 'bin-version-' + env.EXT_RELEASE_CLEAN
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
}
@ -206,6 +237,104 @@ pipeline {
}
}
}
// Use helper containers to render templated files
stage('Update-Templates') {
when {
branch "bin"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
}
}
steps {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=bin -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
# Stage 1 - Jenkinsfile update
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f bin
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
git add Jenkinsfile
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile"
rm -Rf ${TEMPDIR}
exit 0
else
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
fi
done
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f bin
for i in ${TEMPLATES_TO_DELETE}; do
git rm "${i}"
done
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old templates"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# Stage 3 - Update templates
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f bin
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cd ${TEMPDIR}/repo/${LS_REPO}/
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
echo ".jenkins-external" >> .gitignore
git add .gitignore
fi
git add ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi
rm -Rf ${TEMPDIR}'''
script{
env.FILES_UPDATED = sh(
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
@ -242,44 +371,121 @@ pipeline {
"visibility":"public"}' '''
}
}
/* #######################
Scarf.sh package registry
####################### */
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "bin"
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''#! /bin/bash
set -e
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/ffmpeg") | .uuid')
if [ -z "${PACKAGE_UUID}" ]; then
echo "Adding package to Scarf.sh"
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
-H "Authorization: Bearer ${SCARF_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name":"linuxserver/ffmpeg",\
"shortDescription":"example description",\
"libraryType":"docker",\
"website":"https://github.com/linuxserver/docker-ffmpeg",\
"backendUrl":"https://ghcr.io/linuxserver/ffmpeg",\
"publicUrl":"https://lscr.io/linuxserver/ffmpeg"}' || :
else
echo "Package already exists on Scarf.sh"
fi
'''
}
}
/* ###############
Build Container
############### */
// Build Docker container for push to LS Repo
stage('Build-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
expression {
env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true'
}
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
echo "Running on node: ${NODE_NAME}"
sh "docker build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
--label \"org.opencontainers.image.authors=linuxserver.io\" \
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-ffmpeg/packages\" \
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-ffmpeg\" \
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-ffmpeg\" \
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Ffmpeg\" \
--label \"org.opencontainers.image.description=ffmpeg image by linuxserver.io\" \
--no-cache --pull -t ${IMAGE}:${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
// Build MultiArch Docker containers for push to LS Repo
stage('Build-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
allOf {
environment name: 'MULTIARCH', value: 'true'
expression { params.PACKAGE_CHECK == 'false' }
}
environment name: 'EXIT_STATUS', value: ''
}
parallel {
stage('Build X86') {
steps {
sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
echo "Running on node: ${NODE_NAME}"
sh "docker build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
--label \"org.opencontainers.image.authors=linuxserver.io\" \
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-ffmpeg/packages\" \
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-ffmpeg\" \
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-ffmpeg\" \
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Ffmpeg\" \
--label \"org.opencontainers.image.description=ffmpeg image by linuxserver.io\" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
stage('Build ARMHF') {
agent {
label 'X86-64-MULTI'
label 'ARMHF-NATIVE'
}
steps {
echo "Running on node: ${NODE_NAME}"
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
--label \"org.opencontainers.image.authors=linuxserver.io\" \
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-ffmpeg/packages\" \
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-ffmpeg\" \
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-ffmpeg\" \
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Ffmpeg\" \
--label \"org.opencontainers.image.description=ffmpeg image by linuxserver.io\" \
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
@ -291,15 +497,29 @@ pipeline {
}
stage('Build ARM64') {
agent {
label 'X86-64-MULTI'
label 'ARM64'
}
steps {
echo "Running on node: ${NODE_NAME}"
echo 'Logging into Github'
sh '''#! /bin/bash
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
'''
sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker build \
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
--label \"org.opencontainers.image.authors=linuxserver.io\" \
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-ffmpeg/packages\" \
--label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-ffmpeg\" \
--label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-ffmpeg\" \
--label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \
--label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.vendor=linuxserver.io\" \
--label \"org.opencontainers.image.licenses=GPL-3.0-only\" \
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
--label \"org.opencontainers.image.title=Ffmpeg\" \
--label \"org.opencontainers.image.description=ffmpeg image by linuxserver.io\" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
@ -330,7 +550,7 @@ pipeline {
}
sh '''#! /bin/bash
set -e
docker pull ghcr.io/linuxserver/lsiodev-ci:latest
docker pull ghcr.io/linuxserver/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
@ -355,7 +575,7 @@ pipeline {
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/lsiodev-ci:latest \
-t ghcr.io/linuxserver/ci:latest \
python /ci/ci.py'''
}
}
@ -376,6 +596,12 @@ pipeline {
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
@ -384,22 +610,32 @@ pipeline {
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:bin
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
fi
docker push ${PUSHIMAGE}:bin
docker push ${PUSHIMAGE}:${META_TAG}
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${PUSHIMAGE}:${SEMVER}
fi
done
'''
}
sh '''#! /bin/bash
for DELETEIMAGE in "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker rmi \
${DELETEIMAGE}:${META_TAG} \
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
${DELETEIMAGE}:bin || :
if [ -n "${SEMVER}" ]; then
docker rmi ${DELETEIMAGE}:${SEMVER} || :
fi
done
'''
}
@ -418,6 +654,12 @@ pipeline {
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
usernameVariable: 'QUAYUSER',
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
@ -426,13 +668,14 @@ pipeline {
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [ "${CI}" == "false" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}"; do
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
@ -442,6 +685,11 @@ pipeline {
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
@ -451,6 +699,11 @@ pipeline {
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker manifest push --purge ${MANIFESTIMAGE}:bin || :
docker manifest create ${MANIFESTIMAGE}:bin ${MANIFESTIMAGE}:amd64-bin ${MANIFESTIMAGE}:arm32v7-bin ${MANIFESTIMAGE}:arm64v8-bin
docker manifest annotate ${MANIFESTIMAGE}:bin ${MANIFESTIMAGE}:arm32v7-bin --os linux --arch arm
@ -459,24 +712,43 @@ pipeline {
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
fi
docker manifest push --purge ${MANIFESTIMAGE}:bin
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
fi
done
'''
}
sh '''#! /bin/bash
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
docker rmi \
${DELETEIMAGE}:amd64-${META_TAG} \
${DELETEIMAGE}:amd64-bin \
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:arm32v7-${META_TAG} \
${DELETEIMAGE}:arm32v7-bin \
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:arm64v8-${META_TAG} \
${DELETEIMAGE}:arm64v8-bin || :
${DELETEIMAGE}:arm64v8-bin \
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
if [ -n "${SEMVER}" ]; then
docker rmi \
${DELETEIMAGE}:amd64-${SEMVER} \
${DELETEIMAGE}:arm32v7-${SEMVER} \
${DELETEIMAGE}:arm64v8-${SEMVER} || :
fi
done
docker rmi \
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
@ -496,9 +768,9 @@ pipeline {
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}"
echo "Pushing New tag for current commit ${META_TAG}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
-d '{"tag":"'${META_TAG}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to bin",\
"type": "commit",\
@ -506,10 +778,10 @@ pipeline {
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "bin",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start
"name": "'${META_TAG}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": true}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
@ -534,8 +806,8 @@ pipeline {
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
docker pull ghcr.io/linuxserver/lsiodev-readme-sync
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
docker pull ghcr.io/linuxserver/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
@ -543,7 +815,7 @@ pipeline {
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
ghcr.io/linuxserver/lsiodev-readme-sync bash -c 'node sync'
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
rm -Rf ${TEMPDIR} '''
}
}

View File

@ -1,5 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the CONTRIBUTING.md -->
<!-- Please read the https://github.com/linuxserver/docker-ffmpeg/blob/bin/.github/CONTRIBUTING.md -->
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io

View File

@ -1,5 +1,4 @@
---
# jenkins variables
project_name: docker-ffmpeg
external_type: na
@ -8,7 +7,7 @@ release_type: prerelease
release_tag: bin
ls_branch: bin
skip_package_check: true
use_qemu: true
armhf_native: true
repo_vars:
- BUILD_VERSION_ARG = 'FFMPEG_VERSION'
- LS_USER = 'linuxserver'