Skip to content

Commit

Permalink
Add container
Browse files Browse the repository at this point in the history
  • Loading branch information
sever-sever committed Dec 15, 2023
1 parent 97814d5 commit 44792de
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions containers/gobgp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

FROM alpine

RUN apk add --update nano \
&& rm -rf /var/cache/apk/*

RUN mkdir /opt/gobgp

WORKDIR /opt/gobgp

RUN wget https://github.com/osrg/gobgp/releases/download/v3.21.0/gobgp_3.21.0_linux_amd64.tar.gz -O /tmp/gobgp.tar.gz \
&& tar -zxf /tmp/gobgp.tar.gz --directory /tmp/ \
&& mv /tmp/gobgp /tmp/gobgpd /usr/local/bin/ \
&& rm -rf /tmp/*

21 changes: 21 additions & 0 deletions containers/gobgp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# gobgp container in VyOS

Build container
```shell
sudo podman build --net host --tag gobgp:one -f ./Dockerfile
```

VyOS configuration:
```shell
set container name gobgp image 'localhost/gobgp:one'
set container name gobgp network NET01 address '10.0.0.2'
set container name gobgp volume gobgp destination '/opt/gobgp'
set container name gobgp volume gobgp source '/config/containers/gobgp'

set protocols bgp system-as '65001'
set protocols bgp address-family ipv4-unicast network 100.64.0.0/24
set protocols bgp neighbor 10.0.0.2 address-family ipv4-flowspec
set protocols bgp neighbor 10.0.0.2 address-family ipv4-unicast
set protocols bgp neighbor 10.0.0.2 remote-as '65001'

```
8 changes: 8 additions & 0 deletions containers/gobgp/conf/bgp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[global.config]
as = 65001
router-id = "10.0.0.2"

[[neighbors]]
[neighbors.config]
neighbor-address = "10.0.0.1"
peer-as = 65001

0 comments on commit 44792de

Please sign in to comment.