File tree 3 files changed +70
-4
lines changed
3 files changed +70
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ ARG UBUNTU_VERSION=22.04
2
2
FROM ubuntu:$UBUNTU_VERSION
3
3
4
4
ARG DEBIAN_FRONTEND=noninteractive
5
- ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
6
5
7
6
# Update and install build requirements.
8
7
RUN apt update && apt upgrade -y && \
@@ -77,14 +76,15 @@ RUN apt update && apt upgrade -y && \
77
76
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/iana/IANA-IPPM-METRICS-REGISTRY-MIB -O /usr/share/snmp/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB && \
78
77
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/ietf/SNMPv2-PDU -O /usr/share/snmp/mibs/ietf/SNMPv2-PDU && \
79
78
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/ietf/IPATM-IPMC-MIB -O /usr/share/snmp/mibs/ietf/IPATM-IPMC-MIB && \
79
+ rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED && \
80
80
python3 -m pip install wheel && \
81
- python3 -m pip install ' protobuf<4' grpcio grpcio-tools && \
81
+ python3 -m pip install protobuf grpcio grpcio-tools && \
82
82
python3 -m pip install 'pytest>=6.2.4' 'pytest-xdist>=2.3.0' && \
83
83
python3 -m pip install 'scapy>=2.4.5' && \
84
84
python3 -m pip install xmltodict && \
85
85
python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311
86
86
87
- ARG UID=1000
87
+ ARG UID=1010
88
88
RUN groupadd -r -g 92 frr && \
89
89
groupadd -r -g 85 frrvty && \
90
90
adduser --system --ingroup frr --home /home/frr \
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This builds an ubuntu 22.04 container for dev / test
5
5
# Build
6
6
7
7
```
8
- docker build -t frr-ubuntu22:latest -f docker/ubuntu-ci/Dockerfile .
8
+ docker build -t frr-ubuntu22:latest --build-arg=UBUNTU_VERSION=22.04 - f docker/ubuntu-ci/Dockerfile .
9
9
```
10
10
11
11
# Run
Original file line number Diff line number Diff line change
1
+ # Ubuntu 24.04
2
+
3
+ This builds an ubuntu 24.04 container for dev / test
4
+
5
+ # Build
6
+
7
+ ```
8
+ docker build -t frr-ubuntu24:latest --build-arg=UBUNTU_VERSION=24.04 -f docker/ubuntu-ci/Dockerfile .
9
+ ```
10
+
11
+ # Run
12
+
13
+ ```
14
+ docker run -d --init --privileged --name frr-ubuntu24 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu24:latest
15
+ ```
16
+
17
+ # Running full topotest (container stops at end)
18
+
19
+ ```
20
+ docker run --init -it --privileged --name frr-ubuntu24 \
21
+ -v /lib/modules:/lib/modules frr-ubuntu24:latest \
22
+ bash -c 'cd /home/frr/frr/tests/topotests; sudo pytest -nauto --dist=loadfile'
23
+ ```
24
+
25
+ # Extract results from the above run into ` run-results ` dir and analyze
26
+
27
+ ```
28
+ tests/topotests/analyze.py -C frr-ubuntu24 -Ar run-results
29
+ ```
30
+
31
+ # Extract coverage from a stopped container into host FRR source tree
32
+
33
+ ```
34
+ docker export frr-ubuntu24 | tar --strip=3 --wildcards -vx '*.gc??'
35
+ lcov -b $(pwd) --capture --directory . --output-file=coverage.info
36
+ ```
37
+
38
+ # make check
39
+
40
+ ```
41
+ docker exec frr-ubuntu24 bash -c 'cd ~/frr ; make check'
42
+ ```
43
+
44
+ # interactive bash
45
+
46
+ ```
47
+ docker exec -it frr-ubuntu24 bash
48
+ ```
49
+
50
+ # Run a specific topotest
51
+
52
+ ```
53
+ docker exec frr-ubuntu24 bash -c 'cd ~/frr/tests/topotests ; sudo pytest ospf_topo1/test_ospf_topo1.py'
54
+ ```
55
+
56
+ # stop & remove container
57
+
58
+ ```
59
+ docker stop frr-ubuntu24 ; docker rm frr-ubuntu24
60
+ ```
61
+
62
+ # remove image
63
+
64
+ ```
65
+ docker rmi frr-ubuntu24:latest
66
+ ```
You can’t perform that action at this time.
0 commit comments