-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
85 lines (71 loc) · 1.97 KB
/
Dockerfile.alpine
File metadata and controls
85 lines (71 loc) · 1.97 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
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 alpine:edge
ARG DEBUG=false
ARG UNAME=hostuser
ARG UID=1000
ARG GID=1000
RUN echo $DEBUG > debug-mode
RUN addgroup -g $GID $UNAME
RUN adduser -u $UID -G $UNAME -H -D -s /bin/ash $UNAME
RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN echo '@community http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
RUN apk update && apk add --no-cache \
virtme-ng@testing \
git \
py3-requests \
py3-psutil \
py3-setuptools \
py3-pyroute2 \
py3-argcomplete \
qemu-system-x86_64@community \
scapy@community \
make \
gcc \
musl-dev \
flex \
bison \
linux-headers \
elfutils-dev \
util-linux \
coreutils \
diffutils \
findutils \
file \
bash \
kmod \
perl \
iptables-dev \
libcap-dev \
libmnl-dev \
iproute2 \
jq \
libbpf-dev \
rsync \
openssl-dev
RUN mkdir -p /tmp/kernel-patches && \
mkdir -p /tmp/iproute2-patches
COPY tdc.config /tmp
COPY tdc-debug.config /tmp
COPY kernel-patches /tmp/kernel-patches/
COPY iproute2-patches /tmp/iproute2-patches/
COPY configs /tmp/configs/
RUN git config --global user.email foo@bar.com
RUN git config --global user.name foo@bar.com
# iproute2
RUN git clone https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git /nipa-data/iproute2
RUN cd /nipa-data/iproute2 && \
git remote add stable https://git.kernel.org/pub/scm/network/iproute2/iproute2.git && \
git fetch --all && \
git merge stable/main
RUN if [ "$(find /tmp/iproute2-patches/ -name *.patch)" ]; then \
cd /nipa-data/iproute2; \
git apply /tmp/iproute2-patches/*.patch; \
fi
#RUN cd /nipa-data/iproute2/ && \
# ./configure && \
# make V=1
# Kernel
RUN git clone --no-single-branch --depth=1 https://github.com/linux-netdev/testing.git /nipa-data/kernel
# nipa
RUN git clone --depth=1 -b main https://github.com/p4tc-dev/new-nipa.git nipa
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]