File tree Expand file tree Collapse file tree 1 file changed +22
-17
lines changed Expand file tree Collapse file tree 1 file changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -4,32 +4,37 @@ ARG VERSION="8.4.0"
4
4
5
5
RUN \
6
6
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 && \
14
14
echo "**** download and compile curl ****" && \
15
15
wget "https://curl.haxx.se/download/curl-${VERSION}.tar.gz" &&\
16
16
tar -xf curl-${VERSION}.tar.gz && \
17
17
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" && \
23
28
strip src/curl && \
24
29
echo "**** organize files ****" && \
25
30
mkdir -p \
26
- /curlout/usr/bin \
27
- /curlout/etc/ssl/certs && \
31
+ /curlout/usr/bin \
32
+ /curlout/etc/ssl/certs && \
28
33
cp \
29
- src/curl \
30
- /curlout/usr/bin && \
34
+ src/curl \
35
+ /curlout/usr/bin && \
31
36
cp \
32
- /etc/ssl/cert.pem \
37
+ /etc/ssl/cert.pem \
33
38
/curlout/etc/ssl/certs/ca-certificates.crt
34
39
35
40
# final mod layer
You can’t perform that action at this time.
0 commit comments