File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,26 @@ WORKDIR /app
55COPY . .
66RUN rustup target add x86_64-unknown-linux-musl
77
8+ # Install musl-specific OpenSSL development libraries
89RUN apt-get update && apt-get install -y --no-install-recommends \
910 pkg-config \
1011 libssl-dev \
12+ musl-dev \
13+ musl-tools \
1114 && rm -rf /var/lib/apt/lists/*
1215
16+ # Install musl OpenSSL specifically
17+ RUN wget -q https://www.openssl.org/source/openssl-1.1.1w.tar.gz && \
18+ tar -xzf openssl-1.1.1w.tar.gz && \
19+ cd openssl-1.1.1w && \
20+ CC=musl-gcc ./Configure linux-x86_64 --prefix=/usr/local/musl --openssldir=/usr/local/musl no-shared && \
21+ make -j$(nproc) && \
22+ make install && \
23+ cd .. && \
24+ rm -rf openssl-1.1.1w openssl-1.1.1w.tar.gz
25+
1326ENV OPENSSL_STATIC=1
27+ ENV OPENSSL_DIR=/usr/local/musl
1428ENV PKG_CONFIG_ALLOW_CROSS=1
1529
1630# Exclude the playground that uses edition 2024
Original file line number Diff line number Diff line change @@ -5,12 +5,27 @@ WORKDIR /app
55COPY . .
66RUN rustup target add x86_64-unknown-linux-musl
77
8+ # Install musl-specific OpenSSL development libraries
89RUN apt-get update && apt-get install -y --no-install-recommends \
910 pkg-config \
1011 libssl-dev \
12+ musl-dev \
13+ musl-tools \
14+ wget \
1115 && rm -rf /var/lib/apt/lists/*
1216
17+ # Install musl OpenSSL specifically
18+ RUN wget -q https://www.openssl.org/source/openssl-1.1.1w.tar.gz && \
19+ tar -xzf openssl-1.1.1w.tar.gz && \
20+ cd openssl-1.1.1w && \
21+ CC=musl-gcc ./Configure linux-x86_64 --prefix=/usr/local/musl --openssldir=/usr/local/musl no-shared && \
22+ make -j$(nproc) && \
23+ make install && \
24+ cd .. && \
25+ rm -rf openssl-1.1.1w openssl-1.1.1w.tar.gz
26+
1327ENV OPENSSL_STATIC=1
28+ ENV OPENSSL_DIR=/usr/local/musl
1429ENV PKG_CONFIG_ALLOW_CROSS=1
1530
1631# Exclude the playground that uses edition 2024
You can’t perform that action at this time.
0 commit comments