Skip to content
Mingwei Zhang edited this page Mar 4, 2020 · 3 revisions

Here is a quick Dockerfile that you can use to build and test run it:

Python3

FROM caida/bgpstream:latest

WORKDIR /tmp
ADD . /tmp

RUN apt install -y gcc libyaml-dev && \
    python3 setup.py install

Python2

FROM caida/bgpstream:latest

WORKDIR /tmp
ADD . /tmp

RUN apt install -y gcc python2 python-setuptools python-dev libyaml-dev &&\
    python2 setup.py install

Build and Run

Put that in the root folder and then run

docker build  --tag pywandio-py3   -f Dockerfile ./

Then you can test the pywandio-cat by

docker run -it --rm pywandio-py3 pywandio-cat https://www.caida.org/home/

Temporary Image

To avoid building GCC every time you can create a temporary image and use that instead. Something like this:

FROM caida/bgpstream:latest

RUN apt install -y gcc python2 python-setuptools python-dev libyaml-dev

Tag it with pywandio-prepare and use that in the FROM field of other dependent docker images.

Clone this wiki locally