Skip to content

Commit

Permalink
Docker: add kmod dependency to docker container
Browse files Browse the repository at this point in the history
modprobe and rmmod are used to load the kheaders module as a last option
when kernel headers are not found. The modprobe command is missing in the
docker image and scroipts are failing:

$ /usr/share/bcc/tools/execsnoop --mntnsmap /sys/fs/bpf/mnt_ns_set
sh: 1: modprobe: not found
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module)
...

Signed-off-by: Mauricio Vásquez <[email protected]>
  • Loading branch information
mauriciovasquezbernal authored and yonghong-song committed Jun 3, 2020
1 parent da0d82c commit 5fed2a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ COPY --from=builder /root/bcc/*.deb /root/bcc/

RUN \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python python3 binutils libelf1 && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python python3 binutils libelf1 kmod && \
dpkg -i /root/bcc/*.deb

0 comments on commit 5fed2a9

Please sign in to comment.