-
Notifications
You must be signed in to change notification settings - Fork 237
/
Dockerfile
executable file
·85 lines (74 loc) · 1.76 KB
/
Dockerfile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM quay.io/fedora/fedora:40
ARG CONTAINERS_PATH
# Update distro, install packages and clean any possible leftovers
RUN dnf -y update \
&& \
dnf -y install \
autoconf \
automake \
checkpolicy \
clang \
curl \
dhcp-server \
ethtool \
gcc \
gcc-c++ \
git \
glibc-langpack-en \
groff \
iproute \
iproute-tc \
iputils \
jemalloc-devel \
kernel-devel \
kmod \
libcap-ng-devel \
libtool \
net-tools \
nmap-ncat \
numactl-devel \
openssl \
openssl-devel \
procps-ng \
python3-devel \
python3-pip \
rpmdevtools \
rsync \
selinux-policy-devel \
tcpdump \
unbound \
unbound-devel \
wget \
which \
&& \
dnf clean all
# Compile sparse from source
WORKDIR /workspace/sparse
RUN git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git \
/workspace/sparse \
&& \
make -j4 PREFIX=/usr HAVE_LLVM= HAVE_SQLITE= install
# Compile OpenBFDD from source
WORKDIR /workspace/OpenBFDD
COPY $CONTAINERS_PATH/openbfdd.patch /tmp/openbfdd.patch
RUN git clone https://github.com/dyninc/OpenBFDD.git \
/workspace/OpenBFDD \
&& \
git apply /tmp/openbfdd.patch \
&& \
./autogen.sh \
&& \
./configure --enable-silent-rules \
&& \
make \
&& \
make install
WORKDIR /workspace
COPY $CONTAINERS_PATH/py-requirements.txt /tmp/py-requirements.txt
# Update and install pip dependencies
RUN python3 -m pip install --upgrade pip \
&& \
python3 -m pip install wheel \
&& \
python3 -m pip install -r /tmp/py-requirements.txt
CMD ["/usr/sbin/init"]