forked from projectcalico/bird
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request projectcalico#10 from projectcalico/build_more_files
Build both IPv4 and IPv6 versions of Bird
- Loading branch information
Showing
3 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk update | ||
RUN apk add alpine-sdk linux-headers ncurses-dev readline-dev autoconf flex bison | ||
RUN apk add alpine-sdk linux-headers autoconf flex bison ncurses-dev readline-dev | ||
|
||
#COPY . /code | ||
WORKDIR /code | ||
#RUN autoconf | ||
#RUN ./configure --with-protocols="bgp pipe static" --enable-ipv6 --enable-pthreads | ||
#RUN make | ||
#RUN rm bird bird6 birdc birdcl | ||
#RUN make CC="gcc - static" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
docker build -t birdbuild . | ||
docker run --rm -v `pwd`:/code birdbuild sh -c '\ | ||
autoconf && \ | ||
./configure --with-protocols="bgp pipe static" --enable-ipv6=yes --enable-client=no --enable-pthreads=yes && \ | ||
make && \ | ||
rm bird && \ | ||
make CC="gcc -static" | ||
' | ||
mkdir -p dist | ||
cp bird dist | ||
|
||
docker run --name bird-build -v `pwd`:/code birdbuild ./create_binaries.sh | ||
docker rm -f bird-build || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
autoconf | ||
# Configure just the protocols we need, and enable the client and IPv6 | ||
./configure --with-protocols="bgp pipe static" --enable-ipv6=yes --enable-client=yes --enable-pthreads=yes | ||
make | ||
|
||
# Remove the dynmaic binaries and rerun make to create static binaries and store off the results | ||
rm bird birdcl | ||
make CC="gcc -static" | ||
cp bird dist/bird6 | ||
cp birdcl dist | ||
|
||
# Rerun the build but without IPv6 (or the client) and store off the result. | ||
make clean | ||
./configure --with-protocols="bgp pipe static" --enable-client=no --enable-pthreads=yes | ||
make | ||
rm bird | ||
make CC="gcc -static" | ||
cp bird dist/bird | ||
|