Skip to content

Commit a2f4501

Browse files
committed
CNI libnetwork files
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
1 parent 2915b50 commit a2f4501

8 files changed

Lines changed: 67 additions & 0 deletions

File tree

install/Dockerfile.cniserver

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update \
4+
&& apt-get install -y\
5+
net-tools \
6+
iptables \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY bin/cniserver /var/libnetwork/bin/
10+
COPY cniserver.sh /var/libnetwork/
11+
COPY bin/cnictl /var/libnetwork/bin/
12+
COPY net.conf /var/libnetwork/config/
13+
14+
ENTRYPOINT ["/var/libnetwork/cniserver.sh"]

install/Dockerfile.dnet

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update \
4+
&& apt-get install -y\
5+
net-tools \
6+
iptables \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY bin/dnet /var/libnetwork/bin/
10+
COPY dnet.sh /var/libnetwork/
11+
COPY config.toml /var/libnetwork/config/
12+
13+
ENTRYPOINT ["/var/libnetwork/dnet.sh"]

install/cniserver

18.8 MB
Binary file not shown.

install/cniserver.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
cp /var/libnetwork/bin/cnictl /opt/cni/bin/libnetwork-cni
4+
cp /var/libnetwork/config/net.conf /etc/cni/net.d/00-libnetwork-cni.conf
5+
6+
/var/libnetwork/bin/cniserver &> /home/libnetwork/cniserver.log

install/config.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
title = "LibNetwork Configuration file"
2+
3+
[daemon]
4+
debug = true
5+
labels = ["com.docker.network.driver.overlay.hostmode=true"]
6+
[cluster]
7+
discovery = ""
8+
[datastore]
9+
embedded = false

install/config_working.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
title = "LibNetwork Configuration file"
2+
3+
[daemon]
4+
debug = true
5+
labels = ["com.docker.network.driver.overlay.hostmode=true"]
6+
[cluster]
7+
discovery = "etcd://localhost:2379"
8+
[datastore]
9+
embedded = false
10+
[datastore.client]
11+
provider = "etcd"
12+
Address = "localhost:2379"
13+
[scopes]
14+
[scopes.global]
15+
[scopes.global.client]
16+
provider = "etcd"
17+
address = "localhost:2379"

install/dnet.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
/var/libnetwork/bin/dnet -d -c /var/libnetwork/config/config.toml &> /home/libnetwork/dnet.log

install/net.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cniVersion": "0.2.0",
3+
"name": "orange",
4+
"type": "libnetwork-cni"
5+
}

0 commit comments

Comments
 (0)