Date created: Wednesday, May 25, 2022 3:23:36 PM. Last modified: Monday, June 10, 2024 12:39:34 PM
Dockerfile
BIRD 2.15.1 + Ubuntun 22.04
Example Dockerfile + docker-compose.yaml files to run BIRD 2.15.1 on Ubuntun 22.04:
--- services: bird: build: context: . volumes: - ./bird.cfg:/opt/bird/etc/bird.conf network_mode: "host" restart: "always"
FROM ubuntu:22.04 # System packages: RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget iputils-ping iproute2 vim less # BIRD requirements: RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc binutils m4 make perl flex bison # BIRD RUN wget https://bird.network.cz/download/bird-2.15.1.tar.gz && \ tar -zxvf bird-2.15.1.tar.gz && \ rm bird-2.15.1.tar.gz && \ cd bird-2.15.1 && \ ./configure --disable-client --prefix=/opt/bird && \ make install # Clean-up RUN apt autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Installed as: # /opt/bird/sbin/bird # /opt/bird/sbin/birdcl ENTRYPOINT [ "/opt/bird/sbin/bird", "-f" ]
docker compose build
docker compose up -d
docker compose exec bird /opt/bird/sbin/birdcl
BIRD 2.0.9 + Ubuntu 22.04
Example Dockerfile to package BIRD 2.0.9 into an Ubuntu based container:
FROM ubuntu:20.04 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive && \ # System packages: apt-get install -y --no-install-recommends ca-certificates wget iputils-ping iproute2 vim less && \ # BIRD requirements: apt-get install -y gcc binutils m4 make perl flex bison && \ wget https://bird.network.cz/download/bird-2.0.9.tar.gz && \ tar -zxvf bird-2.0.9.tar.gz && \ rm bird-2.0.9.tar.gz && \ cd bird-2.0.9 && \ ./configure --disable-client --prefix=/opt/bird && \ make install && \ apt autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Installed as: # /opt/bird/sbin/bird # /opt/bird/sbin/birdcl
Previous page: BIRD Commands
Next page: Example BIRD Config - Flowspec