Skip to content

Commit

Permalink
chore: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
3Hren committed Jul 27, 2016
1 parent 34f0369 commit d75e316
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:trusty

RUN apt-get -y -qq update && \
apt-get -y -qq install build-essential devscripts equivs

COPY . /build/blackhole
RUN cd /build/blackhole && \
DEBIAN_FRONTEND=noninteractive mk-build-deps -ir -t "apt-get -qq --no-install-recommends"
RUN cd /build/blackhole && \
yes | debuild -e CC -e CXX -uc -us -j$(cat /proc/cpuinfo | fgrep -c processor) && \
debi

# Test.
RUN cd /tmp && mkdir build && cd build && \
cmake -DENABLE_TESTING=ON /build/blackhole && make && \
./blackhole-tests

# Cleanup
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq purge blackhole-build-deps && \
DEBIAN_FRONTEND=noninteractive apt-get -qq purge build-essential devscripts equivs && \
DEBIAN_FRONTEND=noninteractive apt-get -qq autoremove --purge && \
rm -rf build && \
rm -rf /tmp

0 comments on commit d75e316

Please sign in to comment.