From 8aed24f132712bd91406be89d9d8e53b27668cfc Mon Sep 17 00:00:00 2001 From: Hank Mueller Date: Sun, 9 Aug 2026 23:43:54 +0000 Subject: [PATCH] [bug-ma3v4dg2c9y3] build: bundle BIRD 2.19.1 --- Dockerfile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2b01889..9acb1e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,34 @@ RUN CGO_ENABLED=0 go build -trimpath \ -ldflags="-s -w -X main.gitSHA=${GIT_SHA}" \ -o /out/flock-installer ./cmd/flock-installer +FROM alpine:3.21 AS bird-build + +ARG BIRD_VERSION=2.19.1 +ARG BIRD_SHA256=e91aedac07da4f2718f269f969f65dbcd12f4b58248a784fd32e587b7b4dd7e4 + +RUN apk add --no-cache \ + bison \ + build-base \ + curl \ + flex \ + libssh-dev \ + linux-headers \ + ncurses-dev \ + readline-dev \ + && curl -fsSL --proto '=https' --tlsv1.2 \ + "https://bird.nic.cz/download/bird-${BIRD_VERSION}.tar.gz" \ + -o /tmp/bird.tar.gz \ + && echo "${BIRD_SHA256} /tmp/bird.tar.gz" | sha256sum -c - \ + && tar -xzf /tmp/bird.tar.gz -C /tmp \ + && cd "/tmp/bird-${BIRD_VERSION}" \ + && ./configure --prefix=/usr --sysconfdir=/etc/bird --runstatedir=/run/bird \ + && make -j"$(nproc)" \ + && make DESTDIR=/out install + FROM alpine:3.21 -RUN apk add --no-cache iproute2 bird nftables ca-certificates +RUN apk add --no-cache iproute2 nftables ca-certificates libssh ncurses-libs readline +COPY --from=bird-build /out/usr/sbin/bird /usr/sbin/bird +COPY --from=bird-build /out/usr/sbin/birdc /usr/sbin/birdc COPY --from=build /out/flock /usr/local/bin/flock COPY --from=build /out/flock-agent /usr/local/bin/flock-agent COPY --from=build /out/flock-installer /usr/local/bin/flock-installer