Skip to content

Commit b2ab259

Browse files
committed
Fix curl binary generator
1 parent 4b6e13c commit b2ab259

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

Dockerfile

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,37 @@ ARG VERSION="8.4.0"
44

55
RUN \
66
echo "**** install deps ****" && \
7-
apk add --no-cache \
8-
ca-certificates \
9-
gcc \
10-
make \
11-
musl-dev \
12-
openssl-dev \
13-
zlib-dev && \
7+
apk add --no-cache build-base \
8+
clang \
9+
openssl-dev \
10+
libssh2-dev \
11+
libssh2-static \
12+
openssl-libs-static \
13+
zlib-static && \
1414
echo "**** download and compile curl ****" && \
1515
wget "https://curl.haxx.se/download/curl-${VERSION}.tar.gz" &&\
1616
tar -xf curl-${VERSION}.tar.gz && \
1717
cd curl-* && \
18-
./configure \
19-
--disable-shared \
20-
--with-openssl \
21-
--with-ca-fallback && \
22-
make curl_LDFLAGS=-all-static && \
18+
export CC=clang && \
19+
LDFLAGS="-static" \
20+
PKG_CONFIG="pkg-config --static" ./configure --disable-shared \
21+
--enable-static \
22+
--disable-ldap \
23+
--enable-ipv6 \
24+
--enable-unix-sockets \
25+
--with-ssl \
26+
--with-libssh2 && \
27+
make -j4 V=1 LDFLAGS="-static -all-static" && \
2328
strip src/curl && \
2429
echo "**** organize files ****" && \
2530
mkdir -p \
26-
/curlout/usr/bin \
27-
/curlout/etc/ssl/certs && \
31+
/curlout/usr/bin \
32+
/curlout/etc/ssl/certs && \
2833
cp \
29-
src/curl \
30-
/curlout/usr/bin && \
34+
src/curl \
35+
/curlout/usr/bin && \
3136
cp \
32-
/etc/ssl/cert.pem \
37+
/etc/ssl/cert.pem \
3338
/curlout/etc/ssl/certs/ca-certificates.crt
3439

3540
# final mod layer

0 commit comments

Comments
 (0)