From 45d75bb2543ea8f3a5257f3d4af6670e1b3f895e Mon Sep 17 00:00:00 2001 From: Brian Prodoehl Date: Tue, 3 Oct 2017 15:33:09 -0400 Subject: [PATCH 1/2] Add basic Dockerfile --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0c78fa6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:16.04 + +RUN apt-get update && \ + apt-get install -y build-essential git cmake software-properties-common \ + zlib1g-dev libevent-dev + +RUN add-apt-repository ppa:gophers/archive && \ + apt-get update && \ + apt-get install -y golang-1.9-go && \ + cp /usr/lib/go-1.9/bin/go* /usr/bin/. + +RUN mkdir /src +WORKDIR /src + +RUN git clone https://boringssl.googlesource.com/boringssl && \ + cd boringssl && \ + git checkout chromium-stable && \ + cmake . && \ + make && \ + BORINGSSL_SOURCE=$PWD && \ + cd /usr/local/lib && \ + cp $BORINGSSL_SOURCE/ssl/libssl.a . && \ + cp $BORINGSSL_SOURCE/crypto/libcrypto.a . + +RUN mkdir /src/lsquic-client +COPY ./ /src/lsquic-client/ +RUN cd /src/lsquic-client && \ + cmake -DBORINGSSL_INCLUDE=/src/boringssl/include \ + -DBORINGSSL_LIB=/usr/local/lib . && \ + make + +RUN cd lsquic-client && make test && cp http_client /usr/bin/ From 306ecefeb3b7109c37c8fce755c88e511c065b4b Mon Sep 17 00:00:00 2001 From: Brian Prodoehl Date: Tue, 3 Oct 2017 15:37:20 -0400 Subject: [PATCH 2/2] Update README with Docker instructions. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 629b8e4..3ca37e4 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,18 @@ make make test ``` +Building with Docker +--------- +The library and http_client example can be built with Docker. +``` +docker build -t lsquic-client . +``` + +Then you can use the http_client example from the command line. +``` +docker run -it --rm lsquic-client http_client -H www.google.com -s 74.125.22.106:443 -p / +``` + Platforms ---------