http2 curl

Signed-off-by: Jess Frazelle <me@jessfraz.com>
This commit is contained in:
Jess Frazelle 2016-08-19 10:04:33 -07:00
parent dcfa7cb114
commit 4579b55407
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -1,12 +1,47 @@
# curl in a container
#
# docker run --rm -it \
# jess/curl -sSL https://check.torproject.org/api/ip
# This Dockerfile builds a recent curl with HTTP/2 client support, using
# a recent nghttp2 build.
#
# See the Makefile for how to tag it. If Docker and that image is found, the
# Go tests use this curl binary for integration tests.
#
FROM alpine:latest
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apk --no-cache add \
curl
FROM alpine:edge
CMD [ "curl" ]
RUN apk add --no-cache \
ca-certificates \
nghttp2 \
openssl
ENV CURL_VERSION 7.50.1
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
g++ \
make \
nghttp2-dev \
openssl-dev \
perl \
&& wget https://curl.haxx.se/download/curl-$CURL_VERSION.tar.bz2 \
&& tar xjvf curl-$CURL_VERSION.tar.bz2 \
&& rm curl-$CURL_VERSION.tar.bz2 \
&& ( \
cd curl-$CURL_VERSION \
&& ./configure \
--with-nghttp2=/usr \
--with-ssl \
--enable-ipv6 \
--enable-unix-sockets \
--without-libidn \
--disable-static \
--disable-ldap \
--with-pic \
&& make \
&& make install \
) \
&& rm -r curl-$CURL_VERSION \
&& rm -r /usr/share/man \
&& apk del .build-deps
ENTRYPOINT ["/usr/local/bin/curl"]
CMD ["-h"]