2 =========================================================
4 For building Alpine Linux dev packages, we use docker.
6 Install docker 17.05 or later
7 -----------------------------
9 Depending on your host, there are different ways of installing docker. Refer
10 to the documentation here for instructions on how to install a free version of
11 docker: https://www.docker.com/community-edition
13 Pre-built packages and docker images
14 ------------------------------------
16 The master branch of https://github.com/frrouting/frr.git has a
17 continuous delivery of docker images to docker hub at:
18 https://hub.docker.com/r/ajones17/frr/. These images have the frr packages
19 in /pkgs/apk and have the frr package pre-installed. To copy Alpine
20 packages out of these images:
24 id=`docker create ajones17/frr:latest`
25 docker cp ${id}:/pkgs _some_directory_
28 To run the frr daemons (see below for how to configure them):
32 docker run -it --rm --name frr ajones17/frr:latest
33 docker exec -it frr /bin/sh
40 git clone https://github.com/frrouting/frr.git frr
48 ./docker/alpine/build.sh
50 This will put the apk packages in:
54 ./docker/pkgs/apk/x86_64/
59 To create a base image with the frr packages installed:
63 docker build --rm -f docker/alpine/Dockerfile -t frr:latest .
65 Or, if you don't have a git checkout of the sources, you can build a base
66 image directly off the github account:
70 docker build --rm -f docker/alpine/Dockerfile -t frr:latest \
71 https://github.com/frrouting/frr.git
77 docker run -it --rm --name frr frr:latest
79 In the default configuration, none of the frr daemons will be running.
80 To configure the daemons, exec into the container and edit the configuration
81 files or mount a volume with configuration files into the container on
82 startup. To configure by hand:
86 docker exec -it frr /bin/sh
88 cp /etc/frr/zebra.conf.sample /etc/frr/zebra.conf
89 vi /etc/frr/zebra.conf
92 Or, to configure the daemons using /etc/frr from a host volume, put the
93 config files in, say, ./docker/etc and bind mount that into the
98 docker run -it --rm -v `pwd`/docker/etc:/etc/frr frr:latest
100 We can also build the base image directly from docker-compose, with a
101 docker-compose.yml file like this one:
110 context: https://github.com/frrouting/frr.git
111 dockerfile: docker/alpine/Dockerfile