Skip to content

Docker image to manage container networking using pipework and openvswitch

License

Notifications You must be signed in to change notification settings

oldgregg/docker-pipework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-pipework

A modification of @dreamcat4's docker container for pipework networking. More documentation is available there.

Modifications are meant to be minimal, and better support openvswitch networking.

Usage

Run the below command once. If you're running something like swarm, run it once per node.

docker build -t pipework .
docker run -d --restart=always --name=pipework \
    -v /var/run/docker.sock:/docker.sock \
    -v /var/run/openvswitch/db.sock:/var/run/openvswitch/db.sock \
    --privileged --pid=host --net=host -e run_mode=batch,daemon pipework

The below is an example of a container with two interfaces.

  • eth0 is connected to vlan 5 using the bridge ovs0 on the host and is configured with dhcp.
  • eth1 is connected to vlan 10 using the bridge ovs0 on the host and is configured with the IP address 192.168.10.2/24 using gateway 192.168.10.1.
docker run --net=none \
    -e 'pipework_cmd_000=ovs0 -i eth0 @CONTAINER_NAME@ dhcp @5' \
    -e 'pipework_cmd_001=ovs0 -i eth1 @CONTAINER_NAME@ 192.168.10.2/[email protected] @10' \
    -it debian bash

Credit

Based on original work from jpetazzo and dreamcat4.

Releases

No releases published

Packages

No packages published

Languages