# FRR image for the GNS3 version of the lab.
# Upstream FRRouting 10.5.5 plus three conveniences for GNS3:
#   1. bgpd + bfdd (and the other routing daemons) enabled in /etc/frr/daemons
#   2. a start script that runs /etc/frr/sysctl.sh (if present), starts FRR, then drops the
#      GNS3 console into bash (the upstream image's console shows nothing interactive)
#   3. tcpdump + iperf3 for poking around
#
# Build:   docker build -t ai-fabric-lab/frr:10.5.5 .
# (The .gns3project in this kit expects exactly that image name.)
FROM quay.io/frrouting/frr:10.5.5
RUN sed -i -E "s/^(bgpd|ospfd|ospf6d|ripd|ripngd|isisd|pimd|ldpd|bfdd|vrrpd|eigrpd)=no/\1=yes/" /etc/frr/daemons \
 && printf "service integrated-vtysh-config\n" > /etc/frr/vtysh.conf \
 && (apk add --no-cache tcpdump iperf3 || true)
COPY start.sh /usr/local/bin/lab-start.sh
RUN chmod +x /usr/local/bin/lab-start.sh
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/local/bin/lab-start.sh"]
