summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorRob Gil <rob@rem5.com>2019-02-14 04:06:11 +0100
committerRob Gil <rob@rem5.com>2019-02-15 13:42:23 +0100
commit39e3b9493e3e2e946beee27eb6734a2e57e81ca9 (patch)
treea4aa7cd1156bdb25b84c15b918676961277287dd /docker
parentMerge pull request #3794 from donaldsharp/sharp_import_check (diff)
downloadfrr-39e3b9493e3e2e946beee27eb6734a2e57e81ca9.tar.xz
frr-39e3b9493e3e2e946beee27eb6734a2e57e81ca9.zip
docker: quick and dirty debian 9 img
Signed-off-by: Rob Gil <rob@rem5.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/debian/Dockerfile10
-rw-r--r--docker/debian/README.md17
-rw-r--r--docker/debian/daemons65
-rwxr-xr-xdocker/debian/docker-start10
4 files changed, 102 insertions, 0 deletions
diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile
new file mode 100644
index 000000000..4f192ec33
--- /dev/null
+++ b/docker/debian/Dockerfile
@@ -0,0 +1,10 @@
+FROM debian:stretch
+MAINTAINER Rob Gil (rob@rem5.com)
+RUN apt-get update
+RUN apt-get install -y libpcre3-dev apt-transport-https ca-certificates curl wget logrotate \
+ libc-ares2 libjson-c3 vim systemd procps
+RUN curl -sLO https://ci1.netdef.org/artifact/LIBYANG-YANGRELEASE/shared/build-1/Debian-9-x86_64-Packages/libyang_0.16.46_amd64.deb && dpkg -i libyang_0.16.46_amd64.deb
+RUN curl -sLO https://github.com/FRRouting/frr/releases/download/frr-6.0.2/frr_6.0.2-0.deb9u1_amd64.deb && dpkg -i frr_6.0.2-0.deb9u1_amd64.deb
+ADD daemons /etc/frr/daemons
+ADD docker-start /usr/sbin/docker-start
+ENTRYPOINT ["/usr/sbin/docker-start"]
diff --git a/docker/debian/README.md b/docker/debian/README.md
new file mode 100644
index 000000000..b10d696a7
--- /dev/null
+++ b/docker/debian/README.md
@@ -0,0 +1,17 @@
+# Debian9 Docker
+This is a binary docker container build of debian9.
+
+# Build
+```
+docker build --rm -t frr:6.0.2 .
+```
+
+# Running
+```
+docker run -itd --privileged --name frr frr:latest
+```
+
+vtysh
+```
+docker exec -it frr vtysh
+```
diff --git a/docker/debian/daemons b/docker/debian/daemons
new file mode 100644
index 000000000..ed4d98e1f
--- /dev/null
+++ b/docker/debian/daemons
@@ -0,0 +1,65 @@
+# This file tells the frr package which daemons to start.
+#
+# Sample configurations for these daemons can be found in
+# /usr/share/doc/frr/examples/.
+#
+# ATTENTION:
+#
+# When activation a daemon at the first time, a config file, even if it is
+# empty, has to be present *and* be owned by the user and group "frr", else
+# the daemon will not be started by /etc/init.d/frr. The permissions should
+# be u=rw,g=r,o=.
+# When using "vtysh" such a config file is also needed. It should be owned by
+# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
+#
+# The watchfrr and zebra daemons are always started.
+#
+bgpd=yes
+ospfd=no
+ospf6d=no
+ripd=no
+ripngd=no
+isisd=no
+pimd=no
+ldpd=no
+nhrpd=no
+eigrpd=no
+babeld=no
+sharpd=no
+pbrd=no
+bfdd=no
+fabricd=no
+
+#
+# If this option is set the /etc/init.d/frr script automatically loads
+# the config via "vtysh -b" when the servers are started.
+# Check /etc/pam.d/frr if you intend to use "vtysh"!
+#
+vtysh_enable=yes
+zebra_options=" -A 127.0.0.1 -s 90000000"
+bgpd_options=" -A 127.0.0.1"
+ospfd_options=" -A 127.0.0.1"
+ospf6d_options=" -A ::1"
+ripd_options=" -A 127.0.0.1"
+ripngd_options=" -A ::1"
+isisd_options=" -A 127.0.0.1"
+pimd_options=" -A 127.0.0.1"
+ldpd_options=" -A 127.0.0.1"
+nhrpd_options=" -A 127.0.0.1"
+eigrpd_options=" -A 127.0.0.1"
+babeld_options=" -A 127.0.0.1"
+sharpd_options=" -A 127.0.0.1"
+pbrd_options=" -A 127.0.0.1"
+staticd_options="-A 127.0.0.1"
+bfdd_options=" -A 127.0.0.1"
+fabricd_options="-A 127.0.0.1"
+
+# The list of daemons to watch is automatically generated by the init script.
+watchfrr_options="-r '/usr/lib/frr/watchfrr.sh restart %s' -s '/usr/lib/frr/watchfrr.sh start %s' -k '/usr/lib/frr/watchfrr.sh stop %s'"
+
+# for debugging purposes, you can specify a "wrap" command to start instead
+# of starting the daemon directly, e.g. to use valgrind on ospfd:
+# ospfd_wrap="/usr/bin/valgrind"
+# or you can use "all_wrap" for all daemons, e.g. to use perf record:
+# all_wrap="/usr/bin/perf record --call-graph -"
+# the normal daemon command is added to this at the end.
diff --git a/docker/debian/docker-start b/docker/debian/docker-start
new file mode 100755
index 000000000..43854ab14
--- /dev/null
+++ b/docker/debian/docker-start
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+##
+# For volume mounts...
+##
+chown -R frr:frr /etc/frr
+/etc/init.d/frr start
+exec sleep 10000d