1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

Merge branch 'feature/docker' into dev

This commit is contained in:
Matthias Hannig 2019-12-23 17:17:49 +01:00
commit c0dc46266e
No known key found for this signature in database
GPG key ID: 62E226E47DDCE58D
3 changed files with 44 additions and 2 deletions

30
Dockerfile Normal file
View file

@ -0,0 +1,30 @@
#
# Birdwatcher - Your friendly alice looking glass data source
#
FROM golang:1.13 AS app
WORKDIR /src/birdwatcher
ADD vendor .
ADD go.mod .
ADD go.sum .
RUN go mod download
# Add sourcecode
ADD . .
# Build birdwatcher
RUN make
# Add birdwatcher to bird
FROM ehlers/bird2
COPY --from=app /src/birdwatcher/birdwatcher-linux-amd64 /usr/bin/birdwatcher
ADD etc/birdwatcher/birdwatcher.conf /etc/birdwatcher/birdwatcher.conf
EXPOSE 29184/tcp
EXPOSE 29186/tcp
ENTRYPOINT ["/usr/bin/birdwatcher", "-config", "/etc/birdwatcher/birdwatcher.conf"]

View file

@ -124,6 +124,18 @@ You need to add a Large BGP Community just before you filter a route, for exampl
accept;
}
### Using Docker
You can run the birdwatcher for bird2 with docker:
docker pull alicelg/birdwatcher:latest
docker run -p 29184:29184 -v /var/run/bird.ctl:/usr/local/var/run/bird.ctl -it --rm birdwatcher:latest
Or build your own image:
docker build . -t alicelg/birdwatcher:latest
### Building an RPM
Building RPMs is supported through [fpm](https://github.com/jordansissel/fpm).

View file

@ -69,13 +69,13 @@ requests_per_minute = 10
[bird]
listen = "0.0.0.0:29184"
config = "/etc/bird.conf"
birdc = "/sbin/birdc"
birdc = "birdc"
ttl = 5 # time to live (in minutes) for caching of cli output
[bird6]
listen = "0.0.0.0:29186"
config = "/etc/bird6.conf"
birdc = "/sbin/birdc6"
birdc = "birdc6"
ttl = 5 # time to live (in minutes) for caching of cli output
[parser]