Fix Docker build (#79)

This commit is contained in:
LiteSpeed Tech 2019-09-16 10:17:30 -04:00 committed by GitHub
parent c38e7df733
commit 2718741832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 16 deletions

View file

@ -12,21 +12,18 @@ RUN add-apt-repository ppa:gophers/archive && \
RUN mkdir /src
WORKDIR /src
RUN mkdir /src/lsquic
COPY ./ /src/lsquic/
RUN git clone https://boringssl.googlesource.com/boringssl && \
cd boringssl && \
git checkout chromium-stable && \
git checkout 32e59d2d3264e4e104b355ef73663b8b79ac4093 && \
patch -p1 -i /src/lsquic/patches/boringssl-meds.patch && \
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/
RUN cd /src/lsquic && \
cmake -DBORINGSSL_DIR=/src/boringssl . && \
make
RUN cd lsquic && make test && cp http_client /usr/bin/ && cp http_server /usr/bin

View file

@ -112,14 +112,24 @@ make test
Building with Docker
---------
The library and http_client example can be built with Docker.
The library and the example client and server can be built with Docker.
Initialize Git submodules:
```
cd lsquic
git submodule init
git submodule update
```
Build the Docker image:
```
docker build -t lsquic .
```
Then you can use the http_client example from the command line.
Then you can use the examples from the command line. For example:
```
docker run -it --rm lsquic http_client -H www.google.com -s 74.125.22.106:443 -p /
sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046
sudo docker run -p 12345:12345/udp -v /path/to/certs:/mnt/certs -it --rm lsquic http_server -c www.example.com,/mnt/certs/chain,/mnt/certs/key
```
Platforms