REZ-OAN / lb-xdp-poc

A custom LoadBalancer Using eBPF and xdp
1 stars 0 forks source link

dockerfile does not work #1

Open shajalahamedcse opened 3 months ago

shajalahamedcse commented 3 months ago
FROM ubuntu:24.04

WORKDIR /home/xdp_lb

RUN apt-get update 

RUN apt-get install -y clang llvm libelf-dev libbpf-dev libpcap-dev gcc-multilib build-essential make linux-tools-common

RUN apt-get install -y linux-headers-$(uname -r) linux-tools-$(uname -r) linux-headers-generic linux-tools-generic

RUN apt-get install -y curl iproute2 iputils-ping nano dwarves tcpdump bind9-dnsutils

RUN apt-get install -y jq

RUN apt-get clean

COPY ./xdp/xdp_lb.c .

COPY ./attach_xdp.sh .

RUN clang -O2 -target bpf -g -c xdp_lb.c -o xdp_lb.o

RUN chmod +x attach_xdp.sh
ENTRYPOINT [ "./attach_xdp.sh" ]
Screenshot 2567-06-27 at 10 12 23
REZ-OAN commented 3 months ago

As the docker uses the host machine kernel , you have to use the Ubuntu version of the host machine, here I have used 24.04 version because my host machine has Ubuntu24.04.