]> git.proxmox.com Git - mirror_frr.git/commitdiff
doc: add Ubuntu18.04 and 20.04 container info to building-docker.rst
authorLou Berger <lberger@labn.net>
Mon, 29 Mar 2021 11:45:49 +0000 (07:45 -0400)
committerLou Berger <lberger@labn.net>
Mon, 12 Apr 2021 21:14:10 +0000 (17:14 -0400)
Signed-off-by: Lou Berger <lberger@labn.net>
doc/developer/building-docker.rst

index 852a295fd0d069fdacbb9062db13c5ba0e0a2acd..35b51cd9c04361e2173f3be97c3b713e4f7f65d7 100644 (file)
@@ -12,6 +12,13 @@ source-built FRR on the following base platforms:
 * Centos 7
 * Centos 8
 
+The following platform images are used to support Travis CI and can also
+be used to reproduce topotest failures when the docker host is Ubuntu
+(tested on 18.04 and 20.04):
+
+* Ubuntu 18.04
+* Ubuntu 20.04
+
 The following platform images may also be built, but these simply install a
 binary package from an existing repository and do not perform source builds:
 
@@ -99,3 +106,60 @@ No script::
 No script, multi-arch (ex. amd64, arm64)::
 
    docker buildx build --platform linux/amd64,linux/arm64 -f docker/centos-8/Dockerfile -t frr-centos8:latest .
+
+
+
+Building Ubuntu 18.04 Image
+---------------------------
+
+Build image (from project root directory)::
+
+   docker build -t frr-ubuntu18:latest  -f docker/ubuntu18-ci/Dockerfile .
+
+Start the container::
+
+   docker run -d --privileged --name frr-ubuntu18 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu18:latest
+
+Running a topotest (when the docker host is Ubuntu)::
+
+   docker exec frr-ubuntu18 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+
+Starting an interactive bash session::
+
+   docker exec -it frr-ubuntu18 bash
+
+Stopping an removing a container::
+
+   docker stop frr-ubuntu18 ; docker rm frr-ubuntu18
+
+Removing the built image::
+
+   docker rmi frr-ubuntu18:latest
+
+
+Building Ubuntu 20.04 Image
+---------------------------
+
+Build image (from project root directory)::
+
+   docker build -t frr-ubuntu20:latest  -f docker/ubuntu20-ci/Dockerfile .
+
+Start the container::
+
+   docker run -d --privileged --name frr-ubuntu20 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu20:latest
+
+Running a topotest (when the docker host is Ubuntu)::
+
+   docker exec frr-ubuntu20 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+
+Starting an interactive bash session::
+
+   docker exec -it frr-ubuntu20 bash
+
+Stopping an removing a container::
+
+   docker stop frr-ubuntu20 ; docker rm frr-ubuntu20
+
+Removing the built image::
+
+   docker rmi frr-ubuntu20:latest