Skip to content

Commit

Permalink
Adds the web app to the Docker image
Browse files Browse the repository at this point in the history
Linked to #26
  • Loading branch information
mpiraux committed Jul 31, 2020
1 parent 9244d7f commit ddbd0fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
FROM golang:1.11-alpine
RUN apk add --no-cache make cmake gcc g++ git openssl openssl-dev perl-test-harness-utils tcpdump libpcap libpcap-dev libbsd-dev perl-scope-guard perl-test-tcp
RUN apk add --no-cache make cmake gcc g++ git openssl openssl-dev perl-test-harness-utils tcpdump libpcap libpcap-dev libbsd-dev perl-scope-guard perl-test-tcp python3 yarn && \
pip3 install --upgrade git+https://github.com/QUIC-Tracker/dissector git+https://github.com/QUIC-Tracker/web-app

RUN echo "from quic_tracker.app import app as application" > /web-app.wsgi
RUN ln -s /usr/lib/python3.7/site-packages/quic_tracker/traces /traces
WORKDIR /usr/lib/python3.7/site-packages/quic_tracker/static
RUN yarn install
EXPOSE 5000
ENV QUIC_TRACKER_ALLOW_UPLOAD 1
ENV FLASK_APP=quic_tracker.app

RUN mkdir -p /go/src/github.com/QUIC-Tracker/quic-tracker
ADD . /go/src/github.com/QUIC-Tracker/quic-tracker
WORKDIR /go/src/github.com/QUIC-Tracker/quic-tracker
Expand All @@ -10,7 +20,7 @@ RUN make
WORKDIR /go/src/github.com/mpiraux/ls-qpack-go
RUN make
WORKDIR /go/src/github.com/QUIC-Tracker/quic-tracker
RUN go build -o /test_suite bin/test_suite/test_suite.go
RUN go build -o /scenario_runner bin/test_suite/scenario_runner.go
RUN go build -o /http_get bin/http/http_get.go
RUN go build -o /test_suite bin/test_suite/test_suite.go && \
go build -o /scenario_runner bin/test_suite/scenario_runner.go && \
go build -o /http_get bin/http/http_get.go
CMD ["/test_suite"]
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ Docker builds exist on `Docker Hub`_.

::

docker run --network="host" quictracker/quictracker /http_get -h
docker run --network="host" quictracker/quictracker /scenario_runner -h
docker run --network="host" quictracker/quictracker /test_suite -h
docker run --network="host" mpiraux/quictracker /http_get -h
docker run --network="host" mpiraux/quictracker /scenario_runner -h
docker run --network="host" mpiraux/quictracker /test_suite -h
# Running the web app and mounting traces files from the current directory
docker run -v "$PWD:/traces" -p 5000:5000 mpiraux/quictracker flask run -h 0.0.0.0

.. _Docker Hub: https://hub.docker.com/r/quictracker/quictracker/

0 comments on commit ddbd0fc

Please sign in to comment.