Skip to content

Commit 8890897

Browse files
committed
Update build FFmpeg
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 20f4d67 commit 8890897

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.ffmpeg/Dockerfile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM rclone/rclone:beta AS rclone
21
FROM ubuntu:noble AS builder
3-
ARG FFMPEG_VERSION="7.1"
2+
ARG FFMPEG_VERSION="7.1.1"
43
ARG RCLONE_VER="v1.69.1"
54
ARG GO_VERSION="latest"
5+
ARG GO_CRYPTO_VERSION="v0.35.0"
6+
ARG GO_OAUTH2_VERSION="v0.27.0"
7+
ARG GO_NET_VERSION="v0.36.0"
68

79
USER root
810

@@ -19,9 +21,28 @@ RUN apt-get update -qqy \
1921
&& apt-get -qyy clean \
2022
&& mkdir -p /usr/local/src
2123

22-
COPY --from=rclone /usr/local/bin/rclone /usr/local/bin/rclone
24+
RUN if [ "${GO_VERSION}" = "latest" ]; then \
25+
GO_VERSION=$(curl -sk https://go.dev/dl/?mode=json | jq -r '.[0].version'); \
26+
fi \
27+
&& curl -skLO https://go.dev/dl/${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz \
28+
&& tar -xf ${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz -C /usr/local \
29+
&& rm -rf ${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz* \
30+
&& ln -sf /usr/local/go/bin/go /usr/bin/go \
31+
&& go version
2332

24-
RUN rclone --version
33+
RUN cd /usr/local/src \
34+
&& git clone https://github.com/rclone/rclone.git --filter=blob:none \
35+
&& cd rclone \
36+
&& git checkout ${RCLONE_VER} \
37+
# Patch deps version in go.mod to fix CVEs
38+
&& sed -i "s|golang.org/x/crypto v.*|golang.org/x/crypto ${GO_CRYPTO_VERSION}|g" go.mod \
39+
&& sed -i "s|golang.org/x/oauth2 v.*|golang.org/x/oauth2 ${GO_OAUTH2_VERSION}|g" go.mod \
40+
&& sed -i "s|golang.org/x/net v.*|golang.org/x/net ${GO_NET_VERSION}|g" go.mod \
41+
&& go mod tidy \
42+
# Build rclone
43+
&& make \
44+
&& mv ~/go/bin/rclone /usr/local/bin/ \
45+
&& rclone version
2546

2647
#======================================
2748
# Install x264 from source

.github/workflows/docker-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,16 @@ jobs:
172172
- name: Format and lint scripts
173173
run: |
174174
make format_shell_scripts
175+
- name: Disable QEMU
176+
if: matrix.test-strategy == 'test_node_relay' && contains(matrix.os, 'amd') == true
177+
run: echo "DOCKER_ENABLE_QEMU=false >> $GITHUB_ENV"
175178
- name: Set up containerd image store feature
176179
uses: nick-invision/retry@master
177180
with:
178181
timeout_minutes: 10
179182
max_attempts: 3
180183
command: |
181-
make setup_dev_env
184+
DOCKER_ENABLE_QEMU=${DOCKER_ENABLE_QEMU} make setup_dev_env
182185
- name: Output Docker info
183186
run: docker info
184187
- name: Set up Python

tests/charts/make/chart_setup_env.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
echo "Set ENV variables"
44
CLUSTER=${CLUSTER:-"minikube"}
55
DOCKER_VERSION=${DOCKER_VERSION:-""}
6+
DOCKER_ENABLE_QEMU=${DOCKER_ENABLE_QEMU:-"true"}
67
HELM_VERSION=${HELM_VERSION:-"latest"}
78
KUBERNETES_VERSION=${KUBERNETES_VERSION:-$(curl -L -s https://dl.k8s.io/release/stable.txt)}
89

@@ -49,9 +50,7 @@ fi
4950
docker version
5051
docker buildx version
5152
docker buildx use default || true
52-
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
53-
docker run --privileged --rm tonistiigi/binfmt --install all ;
54-
else
53+
if [ "${DOCKER_ENABLE_QEMU}" = "true" ]; then
5554
docker run --privileged --rm tonistiigi/binfmt --install all ;
5655
fi
5756
docker info

0 commit comments

Comments
 (0)