Skip to content

Commit

Permalink
Fixes for debian and ubuntu docker build
Browse files Browse the repository at this point in the history
* Fixed build for debian and ubuntu
* Bumped debian and ubuntu versions (fix some build-dependency issues)
* Make debian and ubuntu Dockerfiles use the same build script
* Build-dependencies now installing automatically via pbuilder
  • Loading branch information
Pavel Safronov authored and drzaeus77 committed Aug 17, 2017
1 parent 9de830a commit eb819ca
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
19 changes: 11 additions & 8 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM debian:jessie
FROM debian:stretch

RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv 15CF4D18AF4F7421 && \
echo "deb http:https://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.8 main" > /etc/apt/sources.list.d/llvm.list && \
apt-get update && \
apt-get install -y --no-install-recommends sudo build-essential fakeroot bison cmake debhelper devscripts flex git libedit-dev python zlib1g-dev libllvm3.8 llvm-3.8-dev libclang-3.8-dev libelf-dev luajit libluajit-5.1-dev && \
mkdir -p /usr/share/llvm-3.8 && \
ln -s /usr/lib/llvm-3.8/share/llvm/cmake /usr/share/llvm-3.8/cmake
MAINTAINER Brenden Blanco <[email protected]>

RUN DEBIAN_RELEASE=stretch && \
# Adding non-free repo for netperf
echo "deb http:https://deb.debian.org/debian ${DEBIAN_RELEASE} non-free" > \
/etc/apt/sources.list.d/debian-non-free.list && \
apt-get -qq update && \
apt-get -y install pbuilder aptitude

COPY ./ /root/bcc

WORKDIR /root/bcc

RUN ./scripts/build-deb.sh
RUN /usr/lib/pbuilder/pbuilder-satisfydepends && \
./scripts/build-deb.sh
23 changes: 8 additions & 15 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# File to be used for building an Ubuntu .deb
FROM ubuntu:xenial

FROM ubuntu:trusty
MAINTAINER Brenden Blanco <[email protected]>

MAINTAINER Brenden Blanco <[email protected]>
RUN apt-get -qq update && \
apt-get -y install pbuilder aptitude

RUN apt-get -y install wget
RUN printf "deb http:https://llvm.org/apt/trusty/ llvm-toolchain-trusty main\ndeb-src http:https://llvm.org/apt/trusty/ llvm-toolchain-trusty main\n" > /etc/apt/sources.list.d/llvm.list
RUN wget -q -O - http:https://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
RUN apt-get -y update
COPY ./ /root/bcc

RUN apt-get -y install bison build-essential cmake debhelper devscripts flex git libedit-dev python zlib1g-dev
RUN apt-get -y install libllvm3.8 llvm-3.8-dev libclang-3.8-dev

RUN mkdir -p /root/bcc/build
COPY ./ /root/bcc/
WORKDIR /root
RUN tar zcf bcc_0.1.1.orig.tar.gz bcc/
WORKDIR /root/bcc
RUN DEB_BUILD_OPTIONS="nocheck parallel=4" debuild -us -uc

RUN /usr/lib/pbuilder/pbuilder-satisfydepends && \
./scripts/build-deb.sh
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Priority: optional
Standards-Version: 3.9.5
Build-Depends: debhelper (>= 9), cmake, libllvm3.7 | libllvm3.8,
llvm-3.7-dev | llvm-3.8-dev, libclang-3.7-dev | libclang-3.8-dev,
libelf-dev, bison, flex, libfl-dev, libedit-dev,
libelf-dev, bison, flex, libfl-dev, libedit-dev, zlib1g-dev, git,
clang-format | clang-format-3.7 | clang-format-3.8, python (>= 2.7),
python-netaddr, python-pyroute2, luajit, libluajit-5.1-dev, arping,
inetutils-ping | iputils-ping, iperf, netperf, ethtool, devscripts
Expand Down

0 comments on commit eb819ca

Please sign in to comment.