@@ -23,16 +23,18 @@ ARG LIBMAXMINDDB_URL=https://github.com/maxmind/libmaxminddb/releases/download/$
23
23
# Get Dockerfile cross-compilation helpers.
24
24
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
25
25
26
- # Get Python cryptography wheel. It is needed for certbot.
26
+ # Get Python cryptography wheel. It is needed for certbot.
27
27
FROM moonbuggy2000/python-musl-wheels:cryptography43.0.0-py3.11-${TARGETARCH}${TARGETVARIANT} AS mod_cryptography
28
28
29
- # Build UPX.
30
- FROM --platform=$BUILDPLATFORM alpine:3.18 AS upx
31
- RUN apk --no-cache add build-base curl make cmake git && \
29
+ # Get UPX (statically linked).
30
+ # NOTE: UPX 5.x is not compatible with old kernels, e.g. 3.10 used by some
31
+ # Synology NASes. See https://github.com/upx/upx/issues/902
32
+ FROM --platform=$BUILDPLATFORM alpine:3.20 AS upx
33
+ ARG UPX_VERSION=4.2.4
34
+ RUN apk --no-cache add curl && \
32
35
mkdir /tmp/upx && \
33
- curl -# -L https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-src.tar.xz | tar xJ --strip 1 -C /tmp/upx && \
34
- make -C /tmp/upx build/release-gcc -j$(nproc) && \
35
- cp -v /tmp/upx/build/release-gcc/upx /usr/bin/upx
36
+ curl -# -L https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz | tar xJ --strip 1 -C /tmp/upx && \
37
+ cp -v /tmp/upx/upx /usr/bin/upx
36
38
37
39
# Build Nginx Proxy Manager.
38
40
FROM --platform=$BUILDPLATFORM alpine:3.18 AS npm
@@ -103,10 +105,10 @@ RUN \
103
105
&& \
104
106
# Install pip.
105
107
# NOTE: pip from the Alpine package repository is debundled, meaning that
106
- # its dependencies are part of the system-wide ones. This save a lot
108
+ # its dependencies are part of the system-wide ones. This save a lot
107
109
# of space, but these dependencies conflict with the ones required by
108
110
# Certbot plugins. Thus, we need to manually install pip (with its
109
- # built-in dependencies). See:
111
+ # built-in dependencies). See:
110
112
# https://pip.pypa.io/en/stable/development/vendoring-policy/
111
113
curl -# -L "https://bootstrap.pypa.io/get-pip.py" | python3
112
114
0 commit comments