-
Notifications
You must be signed in to change notification settings - Fork 9
/
Containerfile
60 lines (50 loc) · 1.62 KB
/
Containerfile
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
FROM quay.io/centos/centos:stream9
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled crb
RUN dnf install -y epel-next-release epel-release
RUN dnf install \
--allowerasing \
/usr/bin/python \
coreutils \
ethtool \
git \
httpd \
iperf3 \
ipmitool \
iproute \
iptables \
iputils \
jq \
nc \
net-tools \
netperf \
nftables \
pciutils \
procps-ng \
python3 \
python3.11 \
sysstat \
tcpdump \
tini \
util-linux \
vim \
wget \
-y
RUN python3.11 -m venv /opt/pyvenv3.11
RUN /opt/pyvenv3.11/bin/python -m pip install --upgrade pip
RUN /opt/pyvenv3.11/bin/python -m pip install \
pytest
COPY requirements.txt /tmp/
RUN /opt/pyvenv3.11/bin/python -m pip install -r /tmp/requirements.txt && \
rm -rf /tmp/requirements.txt
RUN \
echo -e "#/bin/sh\nexec /opt/pyvenv3.11/bin/python \"\$@\"" > /usr/bin/python-pyvenv3.11 && \
chmod +x /usr/bin/python-pyvenv3.11 && \
echo -e "#!/bin/sh\nexec /opt/pyvenv3.11/bin/python -m ktoolbox.netdev \"\$@\"" > /usr/bin/ktoolbox-netdev && \
chmod +x /usr/bin/ktoolbox-netdev
RUN mkdir -p /etc/kubernetes-traffic-flow-tests && echo "kubernetes-traffic-flow-tests" > /etc/kubernetes-traffic-flow-tests/data
COPY ./scripts/simple-tcp-server-client.py /usr/bin/simple-tcp-server-client
COPY ./images/container-entry-point.sh /usr/bin/container-entry-point.sh
WORKDIR /
ENTRYPOINT ["/usr/bin/container-entry-point.sh"]
CMD ["/usr/bin/sleep", "infinity"]