File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ RUN upx /tmp/go/bin/bcrypt-tool
6767
6868# Build certbot and its plugins.
6969FROM alpine:3.23 AS certbot
70+ ARG TARGETPLATFORM
7071ARG CERTBOT_VERSION
7172COPY --from=npm /tmp/nginx-proxy-manager-install/opt/nginx-proxy-manager/certbot/dns-plugins.json /build/
7273COPY src/certbot /build
Original file line number Diff line number Diff line change 3232
3333apk --no-cache add \
3434 coreutils \
35+ patchelf \
3536 xxhash \
3637 curl \
3738 jq \
@@ -51,6 +52,23 @@ apk --no-cache add \
5152 rust \
5253 cargo \
5354
55+ # Needed to build cryptography wheel (linux/386).
56+ if [ " $TARGETPLATFORM " = " linux/386" ]; then
57+ apk --no-cache add \
58+ openssl-dev \
59+
60+ fi
61+
62+ # Needed to build lxml wheel (linux/386).
63+ if [ " $TARGETPLATFORM " = " linux/386" ]; then
64+ apk --no-cache add \
65+ libxml2-dev \
66+ libxml2-static \
67+ libxslt-dev \
68+ libxslt-static \
69+
70+ fi
71+
5472#
5573# Build certbot.
5674#
@@ -63,6 +81,7 @@ curl -# -L -o /packages/cryptography-46.0.5-cp312-abi3-linux_armv7l.whl \
6381 https://wheels.eeems.codes/cryptography/cryptography-46.0.5-cp312-abi3-linux_armv7l.whl
6482
6583export OSTYPE=' linux-gnu'
84+ export STATIC_DEPS=true # For lxml wheel
6685mkdir /tmp/certbot-symlinks
6786
6887log " Installing certbot..."
@@ -144,3 +163,37 @@ while IFS= read -r line; do
144163 fi
145164done < " $TMP_FILE "
146165rm -f " $TMP_FILE " /tmp/.seen*
166+
167+ log " Checking libraries dependencies..."
168+ for lib in $( find /opt/certbot/ -type f -name " *.so" -exec patchelf --print-needed {} ' ;' | sort -u)
169+ do
170+ if [ " $TARGETPLATFORM " = " linux/386" ]; then
171+ case " $lib " in
172+ libgcc_s* )
173+ ;;
174+ libc.musl-* )
175+ ;;
176+ libffi.so.8)
177+ ;;
178+ libcrypto.so.3)
179+ ;;
180+ libssl.so.3)
181+ ;;
182+ * )
183+ echo " ERROR: New library dependency: $lib "
184+ exit 1
185+ ;;
186+ esac
187+ else
188+ case " $lib " in
189+ libgcc_s* )
190+ ;;
191+ libc.musl-* )
192+ ;;
193+ * )
194+ echo " ERROR: New library dependency: $lib "
195+ exit 1
196+ ;;
197+ esac
198+ fi
199+ done
You can’t perform that action at this time.
0 commit comments