mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-20 20:01:13 +00:00
fix: build OpenSSL from source for musl target
This commit is contained in:
parent
b1135a7c91
commit
ef56a5231c
1 changed files with 16 additions and 1 deletions
|
|
@ -5,14 +5,29 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update -y && \
|
RUN apt-get update -y && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
musl-tools \
|
musl-tools \
|
||||||
|
musl-dev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
git && \
|
git \
|
||||||
|
perl \
|
||||||
|
make && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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
|
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
|
WORKDIR /build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue