# docker.io/acmel/linux-perf-tools-build-ubuntu:15.10
FROM docker.io/ubuntu:15.10
MAINTAINER Arnaldo Carvalho de Melo <acme@kernel.org>
ENV DEBIAN_FRONTEND noninteractive
# The following 'apt-get install' line is to be able to build a kernel, do a make header_install, etc,
# So that we can build samples/bpf/
# bc findutils clang llvm \
# But the standard llvm/clang pair in 15.10 is 3.6, without support for bpf
# 3.7 is present, but I couldn't quickly figure it out how to set it as the
# default, does it use alternatives?
RUN apt-get -y update && \
    apt-get -y install make gcc flex bison libelf-dev libdw-dev \
		       libunwind8-dev libaudit-dev libssl-dev \
		       libslang2-dev libgtk2.0-dev libperl-dev \
		       systemtap-sdt-dev \
		       python-dev binutils-dev liblzma-dev libnuma-dev && \
    apt-get clean && \
    rm -rf /usr/share/doc /usr/share/gtk-doc /usr/share/locale /usr/share/man
RUN mkdir -m 777 -p /git /tmp/build/perf /tmp/build/objtool /tmp/build/linux && \
    groupadd -r perfbuilder && \
    useradd -m -r -g perfbuilder perfbuilder && \
    chown -R perfbuilder.perfbuilder /tmp/build/ /git/
USER perfbuilder
COPY rx_and_build.sh /
ENTRYPOINT ["/rx_and_build.sh"]
