瀏覽代碼

Add a Docker image with curl supporting http2

Brad Fitzpatrick 11 年之前
父節點
當前提交
0fe8c920c6
共有 2 個文件被更改,包括 35 次插入0 次删除
  1. 32 0
      Dockerfile
  2. 3 0
      Makefile

+ 32 - 0
Dockerfile

@@ -0,0 +1,32 @@
+FROM ubuntu:trusty
+
+RUN apt-get update && \
+    apt-get upgrade -y && \
+    apt-get install -y git-core build-essential wget
+
+RUN apt-get install -y --no-install-recommends autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libevent-dev
+
+RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git
+
+RUN apt-get install -y --no-install-recommends automake autoconf
+
+WORKDIR /root/nghttp2
+RUN autoreconf -i
+RUN automake
+RUN autoconf
+RUN ./configure
+RUN make
+RUN make install
+
+WORKDIR /root
+RUN wget http://curl.haxx.se/download/curl-7.38.0.tar.gz
+RUN tar -zxvf curl-7.38.0.tar.gz
+WORKDIR /root/curl-7.38.0
+RUN ./configure --with-ssl --with-nghttp2=/usr/local
+RUN make
+RUN make install
+RUN ldconfig
+
+CMD ["-h"]
+ENTRYPOINT ["/usr/local/bin/curl"]
+

+ 3 - 0
Makefile

@@ -0,0 +1,3 @@
+curlimage:
+	docker build -t gohttp2/curl .
+