Skip to content

Commit 130727f

Browse files
committed
Docker: Use curl static binary
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent f0ab6c9 commit 130727f

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.ffmpeg/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM ubuntu:noble AS builder
2-
ARG FFMPEG_VERSION="7.1"
2+
ARG FFMPEG_VERSION="7.1.1"
33
ARG RCLONE_VER="v1.69.1"
44
ARG GO_VERSION="latest"
55
ARG GO_CRYPTO_VERSION="v0.35.0"
66
ARG GO_OAUTH2_VERSION="v0.27.0"
7+
ARG GO_NET_VERSION="v0.36.0"
78

89
USER root
910

@@ -30,12 +31,13 @@ RUN if [ "${GO_VERSION}" = "latest" ]; then \
3031
&& go version
3132

3233
RUN cd /usr/local/src \
33-
&& git clone https://github.com/rclone/rclone.git \
34+
&& git clone https://github.com/rclone/rclone.git --filter=blob:none \
3435
&& cd rclone \
3536
&& git checkout ${RCLONE_VER} \
3637
# Patch deps version in go.mod to fix CVEs
3738
&& sed -i "s|golang.org/x/crypto v.*|golang.org/x/crypto ${GO_CRYPTO_VERSION}|g" go.mod \
3839
&& 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 \
3941
&& go mod tidy \
4042
# Build rclone
4143
&& make \
@@ -46,7 +48,7 @@ RUN cd /usr/local/src \
4648
# Install x264 from source
4749
#======================================
4850
RUN cd /usr/local/src \
49-
&& git clone https://code.videolan.org/videolan/x264.git \
51+
&& git clone https://code.videolan.org/videolan/x264.git --filter=blob:none \
5052
&& cd x264 \
5153
&& ./configure --prefix="/usr/local" --enable-static \
5254
&& make \
@@ -56,9 +58,9 @@ RUN cd /usr/local/src \
5658
# Install FFmpeg from source
5759
#======================================
5860
RUN cd /usr/local/src \
59-
&& git clone https://github.com/FFmpeg/FFmpeg.git \
61+
&& git clone https://github.com/FFmpeg/FFmpeg.git --filter=blob:none \
6062
&& cd FFmpeg \
61-
&& git checkout release/${FFMPEG_VERSION} \
63+
&& git checkout n${FFMPEG_VERSION} \
6264
&& rm -rf .git \
6365
&& PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" FFMPEG_VERSION=${FFMPEG_VERSION} ./configure \
6466
--prefix="/usr/local" \

Base/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ ENV DEBIAN_FRONTEND=noninteractive \
4545
# Miscellaneous packages
4646
# Includes minimal runtime used for executing non GUI Java programs
4747
#========================
48+
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse\n" > /etc/apt/sources.list \
49+
&& echo "deb-src [arch=amd64] http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse\n" >> /etc/apt/sources.list \
50+
&& echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse" >> /etc/apt/sources.list \
51+
&& echo "deb-src [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse" >> /etc/apt/sources.list
52+
4853
RUN apt-get -qqy update \
4954
&& apt-get upgrade -yq \
5055
&& apt-get -qqy --no-install-recommends install \
@@ -56,14 +61,18 @@ RUN apt-get -qqy update \
5661
unzip \
5762
wget \
5863
jq \
59-
curl \
6064
supervisor \
6165
gnupg2 \
6266
libnss3-tools \
6367
openjdk-${JRE_VERSION}-jdk-headless \
6468
ca-certificates \
6569
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
6670

71+
RUN ARCH=$(if [ "$(dpkg --print-architecture)" = "arm64" ]; then echo "aarch64"; else echo "$(dpkg --print-architecture)"; fi) \
72+
&& wget -q https://github.com/moparisthebest/static-curl/releases/download/v8.11.0/curl-$ARCH -O /usr/bin/curl \
73+
&& chmod +x /usr/bin/curl \
74+
&& curl --version
75+
6776
RUN --mount=type=secret,id=SEL_PASSWD \
6877
if [ "${TARGETARCH}" = "arm" ] && [ "${TARGETVARIANT}" = "v7" ]; then \
6978
export ARCH=armhf ; \

0 commit comments

Comments
 (0)