# docker.io/acmel/linux-perf-tools-build-archlinux:latest
FROM docker.io/base/archlinux:2017.09.01
MAINTAINER Arnaldo Carvalho de Melo <acme@kernel.org>
# It is not finding the gtk2 headers, even with gtk2 installed and
# gtk.h available at /usr/include/gtk-2.0/gtk/gtk.h
# Ditto for python2, with /usr/include/python2.7/Python.h available
# removing them to reduce container footprint till we get this
#   rm -f /etc/ssl/certs/ca-certificates.crt && \
# sorted out.
#		python2 gtk2
RUN pacman -Sy archlinux-keyring --noconfirm && \
    pacman -Syu --noconfirm && \
    pacman -Sy  --noconfirm make gcc flex bison libelf openssl slang libunwind audit numactl && \
    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 && \
    useradd -m perfbuilder
USER perfbuilder
COPY rx_and_build.sh /
ENTRYPOINT ["/rx_and_build.sh"]
