Coder Social home page Coder Social logo

oldgregg / docker-pipework Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 13 KB

Docker image to manage container networking using pipework and openvswitch

License: MIT License

Shell 100.00%
docker docker-image openvswitch ovs ovs-vsctl sdn containers container-networking vlan software-defined-network

docker-pipework's Introduction

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.

docker-pipework's People

Contributors

oldgregg avatar

Forkers

tubbz-alt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.