Skip to content

Instantly share code, notes, and snippets.

@tsahara
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsahara/7332972d057370d2e686 to your computer and use it in GitHub Desktop.
Save tsahara/7332972d057370d2e686 to your computer and use it in GitHub Desktop.
Dockerfile for nghttp2 (without ALPN)
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libevent-dev libjansson-dev libjemalloc-dev
RUN apt-get install -y curl make gcc git g++
WORKDIR /root
RUN curl -L https://github.com/tatsuhiro-t/nghttp2/releases/download/v0.4.0/nghttp2-0.4.0.tar.bz2 | tar jxf -
WORKDIR /root/nghttp2-0.4.0
RUN autoreconf -i
RUN automake
RUN autoconf
RUN ./configure
RUN make
EXPOSE 80
EXPOSE 443
CMD ["./src/nghttpd", "-v", "80", "--no-tls"]
@tsahara
Copy link
Author

tsahara commented May 23, 2014

% mv gistfile1.txt Dockerfile

# マシン/回線によるが、4,5分はかかる。
% docker build -t nghttp2 .

% docker run -i -p 8080:80 nghttp2
IPv4: listen on port 80
IPv6: listen on port 80

# Mac の場合は port forwarding が必要。別ターミナルで次行も実行する。
% boot2docker ssh -L 8080:localhost:8080

# これで完了。さらに別ターミナルから telnet で叩いて、docker run を実行したターミナルにログが出る確かめる。
% tenet localhost 8080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment