fix: build OpenSSL from source for musl target

This commit is contained in:
Nathan Flurry 2026-01-27 17:56:55 -08:00
parent b1135a7c91
commit ef56a5231c

View file

@ -5,14 +5,29 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y \
musl-tools \
musl-dev \
pkg-config \
ca-certificates \
git && \
git \
perl \
make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Build OpenSSL for musl target
RUN curl -sL https://www.openssl.org/source/openssl-3.2.0.tar.gz | tar xz && \
cd openssl-3.2.0 && \
CC=musl-gcc ./Configure no-shared no-async --prefix=/usr/local/musl linux-x86_64 && \
make -j$(nproc) && \
make install_sw && \
cd .. && rm -rf openssl-3.2.0
RUN rustup target add x86_64-unknown-linux-musl
ENV OPENSSL_DIR=/usr/local/musl \
OPENSSL_STATIC=1 \
PKG_CONFIG_ALLOW_CROSS=1
WORKDIR /build
COPY . .