GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2KB

  1. # FRRouting protocol suite, see https://frrouting.org/
  2. FROM ehlers/ipterm-base
  3. RUN set -e -x \
  4. && export DEBIAN_FRONTEND=noninteractive \
  5. && apt-get update \
  6. && apt-get -y --no-install-recommends install apt-transport-https \
  7. && echo "deb [trusted=yes] https://deb.frrouting.org/frr buster frr-stable" > /etc/apt/sources.list.d/frr.list \
  8. && apt-get update \
  9. && apt-get -y --no-install-recommends install frr less \
  10. && rm -rf /var/lib/apt/lists/* \
  11. #
  12. # setup FRR
  13. #
  14. && sed -i '/^ *\(bgp\|ospf\|ospf6\|rip\|ripng\)d *=/ s/=.*/=yes/' /etc/frr/daemons \
  15. && sed -i 's|^\(log.*\)|#\1\nlog file /var/log/frr/frr.log informational|' /etc/frr/frr.conf \
  16. && printf '\nexport VTYSH_PAGER="less -M -i -EFX"\n' >> /root/.profile \
  17. #
  18. # startup script
  19. #
  20. && printf '\
  21. \043!/bin/sh\n\
  22. [ $$ -eq 1 ] && exec dumb-init -r 15:1 -- "$0" "$@"\n\
  23. \n\
  24. sysctl -q net.ipv6.conf.all.forwarding=1\n\
  25. /usr/lib/frr/watchfrr.sh start all\n\
  26. sleep 1\n\
  27. service frr start\n\
  28. \n\
  29. cd /etc/frr\n\
  30. [ -r /root/.profile ] && . /root/.profile\n\
  31. vtysh\n\
  32. exec bash -i\n' \
  33. > /etc/init.sh && chmod +x /etc/init.sh
  34. VOLUME [ "/root", "/etc/frr" ]
  35. CMD [ "/etc/init.sh" ]