Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is working dockerfile. #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
FROM ubuntu:16.04

# system basics
RUN apt-get update && apt-get -y install build-essential gcc-multilib g++-multilib lib32z1 git curl python python-virtualenv python-dev

# qemu deps
RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev
# prepare packages in env
RUN apt-get update && apt-get -y install libpixman-1-dev curl build-essential debootstrap debian-archive-keyring libjpeg-dev zlib1g-dev unzip wget graphviz curl python-dev python-pip python-virtualenv git wget flex bison libtool automake autoconf autotools-dev pkg-config libglib2.0-dev
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && python2 get-pip.py

# fetch qira
RUN git clone https://github.com/geohot/qira.git
WORKDIR /qira

# install python venv
RUN virtualenv venv
RUN bash -c 'source venv/bin/activate && pip install --upgrade pip'

# install python deps, this step will be cached
COPY ./requirements.txt ./requirements.txt
RUN bash -c 'source venv/bin/activate && pip install --upgrade -r requirements.txt'

#build qemu and link qira
COPY ./tracers ./tracers
# install python, build qemu, and link qira
RUN pip install --upgrade -r requirements.txt
RUN cd tracers && ./qemu_build.sh
RUN ln -sf /qira/qira /usr/local/bin/qira

COPY . .

# test will build Cython qiradb
RUN ./run_tests.sh
RUN ln -sf /qira/middleware/qira.py /usr/local/bin/qira