Last active
April 18, 2018 00:04
-
-
Save jeremymeng/4f612d952a38ce389f88eb25ec61791d to your computer and use it in GitHub Desktop.
aspnetcore with perfcollect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM microsoft/aspnetcore | |
# install various tools that are required by perfcollect | |
RUN apt-get update \ | |
&& apt-get -y install zip unzip binutils htop \ | |
linux-tools lttng-tools liblttng-ust-dev | |
RUN mkdir /tools \ | |
&& curl -L http://aka.ms/perfcollect > /tools/perfcollect \ | |
&& chmod +x /tools/perfcollect | |
# Possible mismatch between host kernel version and container linux-tools package version. | |
# However, perf is generic enough to work anyway. | |
RUN version="$(uname -r)" \ | |
&& version="${version%%-*}" \ | |
&& case "$version" in *.*.*) version="${version%.*}";; esac \ | |
&& perfbin="$(ls /usr/bin/perf_*)" \ | |
&& test -e /usr/bin/perf_$version && echo "/usr/bin/perf_$version existed" || ln -s $perfbin /usr/bin/perf_$version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment