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.

Dockerfile 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  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. && url=$(curl -s -S -L 'https://api.github.com/repos/FRRouting/frr/releases?per_page=1' | sed -n 's/^ *"browser_download_url": "\([^"]*\/frr_[0-9.-]*deb\(ian\)\{0,1\}9[u0-9.+%A-Fa-f]*_amd64.deb\)".*/\1/p') \
  7. && if [ -z "$url" ]; then echo "FRR package for Debian not found" >&2; exit 1; fi \
  8. && curl -s -S -L -o /tmp/frr.deb "$url" \
  9. && apt-get -y --no-install-recommends install /tmp/frr.deb \
  10. && rm /tmp/frr.deb \
  11. && if [ ! -f /etc/init.d/frr ]; then ln -s /usr/lib/frr/frr /etc/init.d/frr; fi \
  12. && rm -rf /var/lib/apt/lists/* \
  13. #
  14. # setup FRR
  15. #
  16. && sed -i 's|^log.*|log file /var/log/frr/frr.log informational|' /etc/frr/frr.conf \
  17. && printf '\
  18. \043!/bin/sh\n\
  19. \n\
  20. if grep -E "^ *[a-z].*= *(yes|true|[1-9])" /etc/frr/daemons | grep -q -v "^ *vtysh_enable"; then\n\
  21. service frr start\n\
  22. else\n\
  23. echo\n\
  24. echo "Edit /etc/frr/daemons to activate the needed FRR daemons,"\n\
  25. echo "then start FRR with \"service frr start\"."\n\
  26. fi\n\
  27. echo\n\
  28. \n\
  29. cd /etc/frr\n\
  30. exec bash -i\n' \
  31. > /etc/init.sh && chmod +x /etc/init.sh
  32. VOLUME [ "/root", "/etc/frr" ]
  33. CMD [ "/etc/init.sh" ]