kernel: Build a perf package for 4.11/4.9 kernels

Extract the perf binary from the kernel package and create
a new perf package for each kernel. The perf package uses the
same tags as the kernel package and only contains the perf
binary under /usr/bin. The perf package can be added to the
init section or included as a stage in a multi-stage build
for other packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2017-06-15 10:24:28 -07:00
parent baf32846d8
commit 0b6f1a72b6
2 changed files with 42 additions and 2 deletions

10
kernel/Dockerfile.perf Normal file
View File

@@ -0,0 +1,10 @@
# This Dockerfile extracts the perf utility from a kernel package and
# places it into a scratch image
ARG IMAGE
FROM ${IMAGE} AS kernel
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=kernel /perf /usr/bin/perf