fix: update bird build script and Dockerfile to include readline dependency
CI / changes (push) Successful in 6s
CI / openapi (push) Has been skipped
CI / go (push) Has been skipped
CI / docker-web (push) Has been skipped
CI / docker-bird (push) Successful in 40s
CI / bird2 (push) Successful in 14s
CI / docker-go (push) Successful in 2m50s

Modified the bird build script to enable readline support and updated the Dockerfile to install both libreadline8 and libncurses6, ensuring compatibility with the birdc runtime requirements.
This commit is contained in:
Denozordec
2026-05-19 11:14:28 +07:00
parent 0cb5a7d4cb
commit 35ed79bdd6
2 changed files with 7 additions and 6 deletions
+5 -4
View File
@@ -1,6 +1,7 @@
#!/bin/sh
# Сборка BIRD из официального tarball (версия задаётся BIRD_VERSION, по умолчанию 2.14).
# Запуск от root (Docker) или через sudo на хосте. Префикс установки: /usr/local.
# birdc требует ncurses + readline; в runtime-образе gobinary — libncurses6 + libreadline8.
set -eu
BIRD_VERSION="${BIRD_VERSION:-2.14}"
export DEBIAN_FRONTEND=noninteractive
@@ -12,19 +13,19 @@ apt-get install -y --no-install-recommends \
curl \
flex \
bison \
libncurses-dev
libncurses-dev \
libreadline-dev
cd /tmp
rm -rf "bird-${BIRD_VERSION}"
curl -fsSL "https://bird.network.cz/download/bird-${BIRD_VERSION}.tar.gz" | tar xz
cd "bird-${BIRD_VERSION}"
# birdc only for non-interactive "show protocols" / configure — без readline в runtime.
./configure --prefix=/usr/local --enable-client --disable-readline
./configure --prefix=/usr/local --enable-client
make -j"$(nproc)"
make install
cd /
rm -rf "/tmp/bird-${BIRD_VERSION}"
apt-get purge -y build-essential flex bison libncurses-dev
apt-get purge -y build-essential flex bison libncurses-dev libreadline-dev
apt-get autoremove -y
rm -rf /var/lib/apt/lists/*
+2 -2
View File
@@ -46,8 +46,8 @@ EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/evobgp"]
FROM runtime AS runtime-birdc
# birdc (--disable-readline) линкуется с ncurses (bookworm: libncurses6).
# birdc: динамическая линковка readline + ncurses (debian bookworm).
RUN apt-get update \
&& apt-get install -y --no-install-recommends libncurses6 \
&& apt-get install -y --no-install-recommends libreadline8 libncurses6 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=birdc /usr/local/sbin/bird /usr/local/sbin/birdc /usr/local/sbin/