-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 979 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
sudo \
nano \
curl \
lsb-release \
gnupg2 \
iputils-ping \
net-tools \
iproute2 \
ca-certificates
# FRR
RUN curl -s https://deb.frrouting.org/frr/keys.gpg | tee /usr/share/keyrings/frrouting.gpg > /dev/null
ARG FRRVER="frr-10"
RUN echo "deb [signed-by=/usr/share/keyrings/frrouting.gpg] https://deb.frrouting.org/frr $(lsb_release -s -c) $FRRVER" | tee /etc/apt/sources.list.d/frr.list
RUN apt-get update && apt-get install -y \
frr \
frr-pythontools
COPY frr-restart.sh /usr/local/bin/frr-restart
RUN chmod +x /usr/local/bin/frr-restart
COPY configs/ /etc/frr/hosts/
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Entrypoint picks the right config based on hostname, enables IP forwarding,
# and starts FRR. PID 1 stays a dummy process (tail).
CMD ["/usr/local/bin/entrypoint.sh"]