Commit graph

69 commits

Author SHA1 Message Date
Donatas Abraitis 18becdc29e docker: Install the apk packages regardless of the platform
It was hardcoded to x86_64, but we build Alpine images for more platforms, let's
be dynamical here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-31 11:05:15 +03:00
Donatas Abraitis 8456322835 docker: Use libyang 2.1.80 for Alpine builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-20 23:57:34 +03:00
Donatas Abraitis 27083f7885 docker: Move Alpine dependency packages to APKBUILD file
Do not mix APKBUILD and Dockerfile when installing dependencies.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-20 22:39:14 +03:00
Donatas Abraitis 3fed088e1b docker: Install protobuf-c-devel for ubi8-minimal
configure: error: in `/src':
configure: error: protobuf requested but protoc-c not found.  Install protobuf-c.
See `config.log' for more details

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-20 22:35:53 +03:00
Donatas Abraitis 1152259d8d docker: Use Alpine Linux 3.18
It has the newer libyang version 2.1.55, while 3.17 has 2.1.30.

3.19 will have 2.1.80.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-20 22:11:03 +03:00
Donatas Abraitis 237e2c62ed docker: Use libyang 2.1.80
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-20 22:10:19 +03:00
Christian Hopps 055f4997b4 doc: document sqlite3 depend and add to docker build
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-07-06 18:08:15 -04:00
Christian Hopps 3c43eaa7d4 docker: ubuntu-ci 18.04 -> 22.04, topotest parallel run examples
Update the READMEs, and give example of a full parallel topotest run with
result extraction for analyze.py

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-09 03:19:20 -04:00
Quentin Young 9213d69499
Merge pull request #12797 from jvidalallende/ubi8_minimal_dockerfile
docker: reduce ubi8 images size by using ubi8-minimal as base
2023-04-12 05:47:38 +00:00
Pushpasis Sarkar 5b08f6f9ea doc: Add documentation for MGMT daemon
This commit adds user documentation for the new MGMT daemon and
new FRR Management Framework.

Co-authored-by: Yash Ranjan <ranjany@vmware.com>
Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Co-authored-by: Ujwal P <ujwalp@vmware.com>
Signed-off-by: Pushpasis Sarkar <pushpasis@gmail.com>
2023-03-21 22:09:10 -04:00
Juan Vidal Allende b964031359 docker: add support for ubi8-minimal
Docker image based on ubi8-minimal are smaller in size than previous
ones built with ubi8 as base. Also, due to proper cleanup of caches, the
final image is about 400MB in size (down from ~630MB using the older
ubi8 builder).

This Dockerfile also uses packages built for RHEL (instead of CentOS),
and updates dependencies so that it can compile latest FRR versions.

Signed-off-by: Juan Vidal Allende <juan.vidal1@ibm.com>
2023-02-20 12:18:56 +01:00
Juan Vidal Allende bb36498aa7 docker: remove support for ubi-8
The builder for docker images based on ubi-8 images is broken, and it
generates docker images that are heavy and contain more artifacts than
they need to.

It also installs RPM packages from CentOS that, although seem to be
compatible with ubi-8, may diverge at some point (remember that CentOS
now does not track RHEL closely).

Signed-off-by: Juan Vidal Allende <juan.vidal1@ibm.com>
2023-02-20 12:18:55 +01:00
Donatas Abraitis 784ca7702d docker: Use Alpine 3.17 as base image
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-12-02 15:42:00 +02:00
Donatas Abraitis 7078f9a587 docker: Use Alpine 3.16 image
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-07 21:23:53 +02:00
Donatas Abraitis 7be59f7b7c docker: Keep and copy .apk files after they are built
For debugging purposes and/or to distribute them somewhere else.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-09-20 23:23:55 +03:00
Quentin Young 0bbc787cd3 docker: use Alpine-provided libyang
looks like libyang(2) is back in the upstream alpine repos, so we can
use that instead

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2022-07-17 19:14:28 -04:00
Quentin Young d782b117d0 alpine, docker: Update APKBUILD for libyang
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2022-07-17 19:14:28 -04:00
Donald Sharp f0f993deca
Merge pull request #11270 from opensourcerouting/fix/docker_builds_centos
docker: CentOS/UBI adoptions for librtr 0.8.0
2022-05-24 17:50:34 -04:00
Donatas Abraitis e59e44bacd docker: Use Alpine 3.15 for build
This has librtr 0.8.0, while 3.13 has 0.7.0.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 18:10:00 +03:00
Donatas Abraitis 8fbc0ab6bb docker: Install systemd-devel for centos7 build
```
error: Failed build dependencies:
	systemd-devel is needed by frr-8.3_git275938094422-01.el7.x86_64
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:27:41 +03:00
Donatas Abraitis 91dd071e9a docker: Use librtr 0.8.0 for centos/ubi builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-24 17:18:14 +03:00
Donatas Abraitis e27376e492
Merge pull request #10916 from rampxxxx/feat_frr_ubi8_docker
docker: Adding support for ubi-8 images.
2022-03-31 21:18:30 +03:00
Javier Garcia d4e5ceae70 docker: Adding support for ubi-8 images.
- Create frr docker container based in new Red Hat Universal Base
  Images.

- This build a docker container based in ubi-8.
- Need to get the devel packages from centos-8 stream repos.
- Centos-8 stream repos added : base, appstream, powertools and epel

Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
2022-03-31 12:12:38 +02:00
Javier Garcia d4793367e5 docker: Centos-8 dockerfile fix.
- Need to adapt repos to new centos-8 stream.

Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
2022-03-29 15:08:29 +02:00
Stephen Worley 3728cc8e12 docker: update alpine build enable set own version
Add ability to set your own env for the version of the docker
container alpine image. This is useful for applications like GNS3
who pin a specific version to look for when they boot up. When you build
locally to test your code you can just set the version to 0 so you don't
have to update configs/scripts looking for a specific image version.

Also fix a shebang in docker start for alpine.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-01-04 13:14:51 -05:00
Igor Ryzhov 7a53c83a68 docker: remove grpc from Travis CI
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-01 14:04:42 +03:00
Christian Hopps a3cecfb608 docker: update with micronet changes
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:46 -04:00
Quentin Young 6793327f48 docker: add expected log functions to alpine docker-start
Some basic functions are required by frrcommon.sh

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-08-30 15:21:32 -04:00
Quentin Young 661d41c183 docker: build libyang2 along with FRR
Alpine images have been broken for some time because libyang2 is not
available in Alpine. This patch updates our Dockerfile to build a
libyang2 APK and install it into the image to satisfy FRR's libyang2
dependency.

Unfortunately, libyang2 erroneously includes an internal header from
glibc, making it dependent on glibc to build. FRR's official Docker
images are based on Alpine, which only offers musl libc. Until libyang2
fixes this problem, the libyang2 source that is installed in this image
is a patched version that is compatible with musl libc and not an
official version.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-08-30 11:38:01 -04:00
Quentin Young e15106149f
Merge pull request #8508 from opensourcerouting/systemd-no-lib 2021-07-06 14:54:25 +00:00
David Lamparter ab140d61cd build, doc: extricate --enable-systemd
Ouch, that is a *lot* of places to update...

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-29 17:57:09 +02:00
Donald Lee 4b827e08a1 tests: enable lua script tests in ubuntu-20 ci
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-06-23 00:58:39 +08:00
Wesley Coakley 7266ad4588
docker: Use tini unilaterally and stop tailing /dev/null
tini is a hyper-minimal PID 0 which spawns a child process (watchfrr.sh
in our case), reaps zombies and forwards signals to the script. Starting
watchfrr.sh directly instead of through the old `tail /dev/null` or
`sleep 365d` helps keep things clean too :)

While tini was previously only used in the Alpine container it is useful
to apply this PID 0 to all containers except the special CI ones.

Fixes: #8788
Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
2021-06-15 22:23:50 -04:00
Christian Hopps deca28a33b tests: add grpc unit test
Test uses staticd which required some C++ header protections.
Additionally, the test also runs in the ubuntu20 docker container as
grpc is supported there by the packaging system.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-06 18:03:17 +00:00
Igor Ryzhov 4b57e2c4f5 docker: fix ubuntu containers
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-27 15:57:03 +03:00
Igor Ryzhov bea8786a1c Revert "build: libyangv2 is mainlined, update"
This partially reverts commit 250335d47c.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-27 15:56:06 +03:00
Christian Hopps 250335d47c build: libyangv2 is mainlined, update
Signed-off-by: Christian Hopps <chopps@gmail.com>
2021-05-27 06:44:39 -04:00
Christian Hopps af1b88e990 lib: libyang2 add missed conversion
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-17 22:13:59 -04:00
Christian Hopps 3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Mark Stapp fe390fafc5
Merge pull request #8482 from wesleycoakley/docker-prefer-cmd-to-entrypoint
docker: prefer CMD to ENTRYPOINT for flexibility
2021-04-20 11:58:44 -04:00
Wesley Coakley 3a33be1329
docker: prefer CMD to ENTRYPOINT
Specifying watchfrr as CMD instead of ENTRYPOINT allows one to easily
override this command when starting a docker container. This allows
simple, manual testing via (e.g.) bash. With ENTRYPOINT only the
container will simply explode with an exit code if watchfrr exits.

For instance one could start a shell session in this container via:

```
docker run --name test --rm -i -t <frr-container> bash
```

The default behavior (`docker run <frr-container>` with no command
specified) is not changed.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-04-16 13:05:44 -04:00
Quentin Young 9513086d4e docker: pin alpine base image to 3.13
'latest' isn't appropriate for us

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-16 13:02:18 -04:00
Lou Berger 60bad451a5 ubuntu20-ci: create a docker 20.04 container for dev / test / ci
Signed-off-by: Lou Berger <lberger@labn.net>
2021-04-12 16:56:38 -04:00
Lou Berger cd18e08a01 ubuntu18-ci: create a docker 18.04 container for dev / test / ci
Signed-off-by: Lou Berger <lberger@labn.net>
2021-04-12 16:56:38 -04:00
Wesley Coakley 5fc9775130 docker: centos 7, 8 yang bump and repo fixes
Bump libyang version in centos containers to 1.0.184 and (1) change
"PowerTools" repository to "powertools" to accomodate CentOS Stream
changes

(1) https://bugs.centos.org/view.php?id=17920

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-01-22 07:32:17 -05:00
Wesley Coakley 56518fad27 docker: prefer alpine:latest for building
Building with alpine:edge caused some weirdness with our build
scripts, switching to the stable branch seems to have aleviated this.

We can also ditch the "edge" repositories as the main and community
repositories provide all packages we need

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-01-22 07:32:17 -05:00
Quentin Young f44c7cde33 docker: don't fail on chown /etc/frr
If we can chown /etc/frr then fine, but there's circumstances where we
won't be able to - for instance, if running FRR in Kubernetes where
/etc/frr/* is actually a virtual filesystem.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-10 00:20:04 -04:00
Quentin Young 6eaf4c5d83 docker: fix centos7 install
We require python3-sphinx for RPM builds, but it wasn't being installed.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-01 16:03:35 -04:00
Jafar Al-Gharaibeh c8c42e6afd
Merge pull request #5606 from ton31337/fix/docker_centos8_image_name
docker: Use proper container name when creating CentOS 8 container
2020-01-06 11:24:15 -06:00
Donatas Abraitis 8728ae46c8
Merge pull request #5467 from pogojotz/alpine-linux-build
alpine: fix build on current 'edge' version of Alpine
2020-01-05 22:10:34 +02:00