mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
add perf tooling
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
7bde64dad5
commit
c533656483
38
bcc-tools/Dockerfile
Normal file
38
bcc-tools/Dockerfile
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Usage:
|
||||||
|
# docker run --rm -it \
|
||||||
|
# --privileged \
|
||||||
|
# -v /lib/modules:/lib/modules:ro \
|
||||||
|
# -v /usr/src:/usr/src:ro \
|
||||||
|
# -v /etc/localtime:/etc/localtime:ro \
|
||||||
|
# r.j3ss.co/bcc-tools
|
||||||
|
#
|
||||||
|
FROM debian:stretch
|
||||||
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
dirmngr \
|
||||||
|
gnupg \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# add the iovisor repository
|
||||||
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D4284CDD
|
||||||
|
RUN echo "deb [trusted=yes] https://repo.iovisor.org/apt/xenial xenial-nightly main" > /etc/apt/sources.list.d/iovisor.list
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
binutils \
|
||||||
|
bcc \
|
||||||
|
bcc-tools \
|
||||||
|
libbcc-examples \
|
||||||
|
python-bcc \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV PATH /usr/share/bcc/tools:$PATH
|
||||||
|
|
||||||
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
6
bcc-tools/entrypoint.sh
Executable file
6
bcc-tools/entrypoint.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
mount -t debugfs none /sys/kernel/debug/
|
||||||
|
exec "$@"
|
|
@ -1,6 +1,7 @@
|
||||||
FROM debian:stretch
|
FROM debian:stretch
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
RUN dpkg --add-architecture i386 \
|
RUN dpkg --add-architecture i386 \
|
||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
automake \
|
automake \
|
||||||
|
@ -33,9 +34,11 @@ RUN dpkg --add-architecture i386 \
|
||||||
linux-libc-dev:i386 \
|
linux-libc-dev:i386 \
|
||||||
linux-perf \
|
linux-perf \
|
||||||
make \
|
make \
|
||||||
|
nfs-common \
|
||||||
openssl \
|
openssl \
|
||||||
patch \
|
patch \
|
||||||
perl \
|
perl \
|
||||||
|
psmisc \
|
||||||
rsync \
|
rsync \
|
||||||
ruby \
|
ruby \
|
||||||
ruby-dev \
|
ruby-dev \
|
||||||
|
@ -47,7 +50,12 @@ RUN dpkg --add-architecture i386 \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& ln -snf /usr/bin/perf_4.9 /usr/bin/perf
|
&& ln -snf /usr/bin/perf_4.9 /usr/bin/perf
|
||||||
|
|
||||||
RUN git clone --depth 1 https://github.com/fengguang/lkp-tests.git /usr/src/lkp-tests
|
ENV KERNEL_VERSION v4.13
|
||||||
|
ENV LKP_GIT_WORK_TREE /usr/src/linux
|
||||||
|
RUN git clone -b "${KERNEL_VERSION}" https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git "${LKP_GIT_WORK_TREE}"
|
||||||
|
|
||||||
|
ENV LKP_SRC /usr/src/lkp-tests
|
||||||
|
RUN git clone https://github.com/fengguang/lkp-tests.git "${LKP_SRC}"
|
||||||
|
|
||||||
WORKDIR /usr/src/lkp-tests
|
WORKDIR /usr/src/lkp-tests
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user