Skip to content

Commit

Permalink
docker/ubuntu: add focal and noble
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Jun 28, 2024
1 parent 627610c commit 22f5cf2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docker/ubuntu/focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:focal

# lkp install generates hosts/$HOSTNAME during create_host_config. Here it requires
# user to pass hostname arg to specify a consistent name instead of the container
# hostname when building the image.
ARG hostname=lkp-docker
ENV HOSTNAME=${hostname}

WORKDIR /lkp/lkp-tests

COPY . ./

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
# linux-tools-generic contains perf and turbostat
linux-tools-generic \
make \
# procps installs vmstat, sysctl, etc to partially persistent commonly used dependencies
procps \
sudo && \
make install && \
lkp install && \
# replace the turbostat and perf wrappers in /usr/bin with the ones installed from linux-tools-generic
# because the wrappers have very restrictive kernel version dependency checks
ln -sf $(find /usr/lib -name turbostat | head -n 1) /usr/bin/turbostat && \
ln -sf $(find /usr/lib -name perf | head -n 1) /usr/bin/perf

ENTRYPOINT ["bash", "-c", "sleep infinity"]
28 changes: 28 additions & 0 deletions docker/ubuntu/noble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:noble

# lkp install generates hosts/$HOSTNAME during create_host_config. Here it requires
# user to pass hostname arg to specify a consistent name instead of the container
# hostname when building the image.
ARG hostname=lkp-docker
ENV HOSTNAME=${hostname}

WORKDIR /lkp/lkp-tests

COPY . ./

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
# linux-tools-generic contains perf and turbostat
linux-tools-generic \
make \
# procps installs vmstat, sysctl, etc to partially persistent commonly used dependencies
procps \
sudo && \
make install && \
lkp install && \
# replace the turbostat and perf wrappers in /usr/bin with the ones installed from linux-tools-generic
# because the wrappers have very restrictive kernel version dependency checks
ln -sf $(find /usr/lib -name turbostat | head -n 1) /usr/bin/turbostat && \
ln -sf $(find /usr/lib -name perf | head -n 1) /usr/bin/perf

ENTRYPOINT ["bash", "-c", "sleep infinity"]

0 comments on commit 22f5cf2

Please sign in to comment.