Skip to content

Instantly share code, notes, and snippets.

@andho
Created October 12, 2016 04:05
Show Gist options
  • Save andho/4907e1f1edb34ad99598eafc32a934f6 to your computer and use it in GitHub Desktop.
Save andho/4907e1f1edb34ad99598eafc32a934f6 to your computer and use it in GitHub Desktop.
Docker curl with http2 support. Base ubuntu 16.04. I built this for accessing APNS http2 from PHP
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
git \
g++ make binutils autoconf automake autotools-dev libtool pkg-config \
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \
libjemalloc-dev cython python3-dev python-setuptools
RUN cd ~ && \
git clone https://github.com/tatsuhiro-t/nghttp2.git && \
cd nghttp2 && \
autoreconf -i && \
automake && \
autoconf && \
./configure && \
make && \
make install
RUN cd ~ && \
apt-get build-dep -y curl
RUN apt-get install wget
RUN wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2 && \
tar -xvjf curl-7.46.0.tar.bz2 && \
cd curl-7.46.0 && \
./configure --with-nghttp2=/usr/local --with-ssl && \
make && \
make install && \
ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment