-
Notifications
You must be signed in to change notification settings - Fork 235
Expand file tree
/
Copy pathDockerfile.focal
More file actions
40 lines (30 loc) · 1.84 KB
/
Dockerfile.focal
File metadata and controls
40 lines (30 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM --platform=linux/amd64 ubuntu:focal@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
RUN apt-get update && apt-get -y install curl git
# DPDK
RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic main universe" >> /etc/apt/sources.list
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y build-essential dpdk=17.11.1-6 dpdk-dev=17.11.1-6 libdpdk-dev=17.11.1-6 wget pkg-config libjansson-dev libsystemd-dev
# iptables / DKMS
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y -f wget pkg-config libsystemd-dev dkms debhelper libxtables-dev
# golang
RUN wget --quiet https://golang.org/dl/go1.24.5.linux-amd64.tar.gz -O- | tar -C /usr/local -zxvf -
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"
# fpm for packaging
RUN apt-get update && apt-get install -y ruby ruby-dev rubygems build-essential
# See fpm dependency breakage issue: https://github.com/jordansissel/fpm/issues/1918
RUN gem install --version 2.7.6 dotenv
RUN gem install ffi -f
RUN gem install rake fpm
# XDP
# linux-libc-dev must be upgraded to get a bpf.h that matches what we use. the rest match what we do in Vagrant for testing.
RUN apt-get update && apt install -y apt-transport-https curl software-properties-common
RUN apt-get update && apt install -y iproute2 libbpf-dev linux-libc-dev clang-10
# Hack because the kernel headers are not installed in the right place (linuxkit vs generic)
RUN ln -s /usr/src/$(ls /usr/src/ | grep generic) /usr/src/linux-headers-$(uname -r)
# Hack for C99 math
RUN sed -i '1s/^/#define __USE_C99_MATH\n/' /usr/src/$(ls /usr/src/ | grep generic)/include/linux/kasan-checks.h
RUN sed -i '2s/^/#include <stdbool.h>\n/' /usr/src/$(ls /usr/src/ | grep generic)/include/linux/kasan-checks.h