Skip to content

Commit

Permalink
curl: add compression, ssh, http2
Browse files Browse the repository at this point in the history
partially fixes #10
  • Loading branch information
ansemjo committed Feb 20, 2024
1 parent c564ff7 commit dbf2c9f
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions build/curl
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# curl - commandline tool to transfer data with URL syntax
# Supports HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB,
# TELNET, DICT, LDAP, LDAPS, MQTT, FILE, IMAP, SMTP, POP3, RTSP and RTMP.
# Supports dict file ftp ftps gopher gophers http https imap imaps
# ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
# https://github.com/curl/curl

# base image
FROM alpine:edge as build

# install requirements
RUN apk add --no-cache gnupg gnupg-keyboxd build-base linux-headers curl jq tar xz # common base
RUN apk add --no-cache ca-certificates openssl-libs-static openssl-dev libpsl-static libpsl-dev
RUN apk add --no-cache ca-certificates perl \
openssl-libs-static openssl-dev \
zlib-static zlib-dev \
brotli-static brotli-dev \
zstd-static zstd-dev \
nghttp2-dev nghttp2-static \
libssh2-dev libssh2-static \
libpsl-static libpsl-dev \
libidn2-static libidn2-dev idn2-utils

# import gpg keys and trust them
COPY curl.keys /gpgkeys
Expand All @@ -34,13 +42,20 @@ ENV LDFLAGS="-Wl,-z,now -Wl,-z,relro -static -s"
ENV CFLAGS="-fPIC -pie -fstack-protector-all -O2 -static -s"
ENV CPPFLAGS="-D_FORTIFY_SOURCE=2"
ENV PKG_CONFIG="pkg-config --static"
RUN ./configure \
--with-ssl \
RUN ./configure --help && \
./configure \
--disable-shared \
--enable-static \
--with-ssl \
--with-zlib \
--with-brotli \
--with-zstd \
--with-libssh2 \
--enable-ipv6 \
--enable-unix-sockets \
--enable-manual \
--without-libssh2 \
&& make -j$(nproc) LDFLAGS=-all-static \
--without-libpsl \
&& make -j$(nproc) LDFLAGS="$LDFLAGS -all-static" \
&& (ldd src/curl && exit 1 || true)

# copy sources to new stage
Expand Down

0 comments on commit dbf2c9f

Please sign in to comment.