xref: /aosp_15_r20/external/bcc/docker/Dockerfile.ubuntu (revision 387f9dfdfa2baef462e92476d413c7bc2470293e)
1ARG OS_TAG=18.04
2FROM ubuntu:${OS_TAG} as builder
3
4ARG OS_TAG
5ARG BUILD_TYPE=release
6ARG DEBIAN_FRONTEND=noninteractive
7
8MAINTAINER Brenden Blanco <[email protected]>
9
10RUN apt-get -qq update && \
11    apt-get -y install pbuilder aptitude
12
13COPY ./ /root/bcc
14
15WORKDIR /root/bcc
16
17RUN /usr/lib/pbuilder/pbuilder-satisfydepends && \
18    ./scripts/build-deb.sh ${BUILD_TYPE}
19
20FROM ubuntu:${OS_TAG}
21
22COPY --from=builder /root/bcc/*.deb /root/bcc/
23
24RUN \
25  apt-get update -y && \
26  DEBIAN_FRONTEND=noninteractive apt-get install -y python python3 python3-pip binutils libelf1 kmod  && \
27  if [ ${OS_TAG} = "18.04" ];then \
28    apt-get -y install python-pip && \
29    pip install dnslib cachetools ; \
30  fi ; \
31  pip3 install dnslib cachetools  && \
32  dpkg -i /root/bcc/*.deb
33