Skip to content

Commit 9d2f42f

Browse files
committed
update docker files
1 parent 95b34f3 commit 9d2f42f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,26 @@ WORKDIR /app
55
COPY . .
66
RUN rustup target add x86_64-unknown-linux-musl
77

8+
# Install musl-specific OpenSSL development libraries
89
RUN 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+
1326
ENV OPENSSL_STATIC=1
27+
ENV OPENSSL_DIR=/usr/local/musl
1428
ENV PKG_CONFIG_ALLOW_CROSS=1
1529

1630
# Exclude the playground that uses edition 2024

bundled.Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,27 @@ WORKDIR /app
55
COPY . .
66
RUN rustup target add x86_64-unknown-linux-musl
77

8+
# Install musl-specific OpenSSL development libraries
89
RUN 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+
1327
ENV OPENSSL_STATIC=1
28+
ENV OPENSSL_DIR=/usr/local/musl
1429
ENV PKG_CONFIG_ALLOW_CROSS=1
1530

1631
# Exclude the playground that uses edition 2024

0 commit comments

Comments
 (0)