-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into renovate/postgresql-16.x
- Loading branch information
Showing
24 changed files
with
366 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
FROM ubuntu:noble AS builder | ||
ARG VERSION_FFMPEG="7.1" | ||
ARG VERSION_RCLONE="v1.68.2" | ||
ARG VERSION_GO="latest" | ||
ARG GO_CRYPTO_VERSION="v0.31.0" | ||
|
||
USER root | ||
|
||
#====================================== | ||
# Install build tools | ||
#====================================== | ||
ARG TOOLS_DEPS="autoconf automake cmake libfreetype6 gcc build-essential libtool make nasm pkg-config zlib1g-dev numactl \ | ||
libnuma-dev libx11-dev libxcb-shm0 libxcb1-dev yasm git curl jq wget ca-certificates" | ||
|
||
RUN apt-get update -qqy \ | ||
&& apt-get upgrade -yq \ | ||
&& apt-get -qqy --no-install-recommends install ${TOOLS_DEPS} \ | ||
&& apt-get -qyy clean \ | ||
&& mkdir -p /usr/local/src | ||
|
||
RUN if [ "${VERSION_GO}" = "latest" ]; then \ | ||
VERSION_GO=$(curl -sk https://go.dev/dl/?mode=json | jq -r '.[0].version'); \ | ||
fi \ | ||
&& curl -skLO https://go.dev/dl/$VERSION_GO.linux-$(dpkg --print-architecture).tar.gz \ | ||
&& tar -xf $VERSION_GO.linux-$(dpkg --print-architecture).tar.gz -C /usr/local \ | ||
&& rm -rf $VERSION_GO.linux-$(dpkg --print-architecture).tar.gz* \ | ||
&& ln -sf /usr/local/go/bin/go /usr/bin/go \ | ||
&& go version | ||
|
||
RUN cd /usr/local/src \ | ||
&& git clone https://github.com/rclone/rclone.git \ | ||
&& cd rclone \ | ||
&& git checkout $VERSION_RCLONE \ | ||
# Patch deps version in go.mod to fix CVEs | ||
&& sed -i "s|golang.org/x/crypto v.*|golang.org/x/crypto ${GO_CRYPTO_VERSION}|g" go.mod \ | ||
&& go mod tidy \ | ||
# Build rclone | ||
&& make \ | ||
&& mv ~/go/bin/rclone /usr/local/bin/ \ | ||
&& rclone version | ||
|
||
#====================================== | ||
# Install x264 from source | ||
#====================================== | ||
RUN cd /usr/local/src \ | ||
&& git clone https://code.videolan.org/videolan/x264.git \ | ||
&& cd x264 \ | ||
&& ./configure --prefix="/usr/local" --enable-static \ | ||
&& make \ | ||
&& make install | ||
|
||
#====================================== | ||
# Install FFmpeg from source | ||
#====================================== | ||
RUN cd /usr/local/src \ | ||
&& git clone https://github.com/FFmpeg/FFmpeg.git \ | ||
&& cd FFmpeg \ | ||
&& git checkout release/$VERSION_FFMPEG \ | ||
&& PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \ | ||
--prefix="/usr/local" \ | ||
--extra-cflags="-I/usr/local/include" \ | ||
--extra-ldflags="-L/usr/local/lib" \ | ||
--pkg-config-flags="--static" \ | ||
--enable-gpl \ | ||
--enable-nonfree \ | ||
--enable-libx264 \ | ||
--enable-libxcb \ | ||
--enable-static \ | ||
&& make \ | ||
&& make install | ||
|
||
# Final stage | ||
FROM ubuntu:noble | ||
|
||
USER root | ||
|
||
COPY --from=builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg | ||
COPY --from=builder /usr/local/bin/rclone /usr/local/bin/rclone | ||
|
||
RUN apt-get -qqy update \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
libx11-dev libxcb-shm0 libxcb1-dev \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN ldd /usr/local/bin/ffmpeg \ | ||
&& ffmpeg -version \ | ||
&& rclone --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build and Deploy FFmpeg | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.ffmpeg/Dockerfile' | ||
workflow_dispatch: | ||
inputs: | ||
release: | ||
description: 'Deploy a new release' | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
deploy: | ||
name: Build and Deploy FFmpeg | ||
runs-on: blacksmith-8vcpu-ubuntu-2204 | ||
permissions: write-all | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Set up containerd image store feature | ||
uses: nick-invision/retry@master | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 3 | ||
command: | | ||
make setup_dev_env | ||
- name: Output Docker info | ||
run: docker info | ||
- name: Sets build date | ||
run: | | ||
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV | ||
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV | ||
make set_build_multiarch | ||
cat .env | xargs -I {} echo {} >> $GITHUB_ENV | ||
env: | ||
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }} | ||
AUTHORS: ${{ vars.AUTHORS || 'SeleniumHQ' }} | ||
- name: Build images | ||
uses: nick-invision/retry@master | ||
with: | ||
timeout_minutes: 300 | ||
max_attempts: 2 | ||
retry_wait_seconds: 60 | ||
command: | | ||
PLATFORMS="${PLATFORMS}" make ffmpeg | ||
make tag_ffmpeg_latest | ||
- name: Login Docker Hub | ||
if: ${{ github.event.inputs.release == 'true' }} | ||
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- name: Deploy new images | ||
if: ${{ github.event.inputs.release == 'true' }} | ||
uses: nick-invision/retry@master | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 5 | ||
retry_wait_seconds: 300 | ||
continue_on_error: true | ||
command: | | ||
make release_ffmpeg_latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.