v0.5.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAltNFKIACgkQGPNoXAAi
v/MjWA//XgrwSFfv7w+2006FQf0JDkjYqS/IZNP/JYkcECZzXndoDxry+mBSXi2s
2AlxWzzr0ohhSiJcpJz9YmNkpZ00W2xICvp2iIpXyL9eUG3AuO23zYkdx4VWo2l8
MVCyRJYzWGIKDVsvGp8USTDzG4Qy0KNbfyjnmWNsfG9qhoX5fAeDKt6wkSmSo5Zi
5Z/nUvUWki6w9TCxo/+6duY+fPBdmCkjv/3YRBJl8nxjPx6q2EKxLFf8bA+Rukqp
SvxvgHgaZO7EAXousxIV4gkrNcE+WHsqDtCh6851pVsGyKbQdqih0mggF9/J5oSn
Xbqrsy+IY+nhly1WjvjmxLfjlhtICc8nFbCdZ3K7I9T0BVyTWZBeuPL9sUg6XNwZ
jrVkn6wYNfQxhWShAb1JOTsAIb1FNj6dm7CuxdRYE5tjty1pBj3Jt7T83CfHGw/1
C8hj4erwlrN02/GheWA1vPWlWm4VU6a+X4o25ENT4ovLhMmcHPklMjiPOxvAvW86
Mav9fM2WiwAvjyCFxuKzsjiQNGVbLIJdgGWSUzzG0OYZgHjD4+rmfAjtrfYEAIIR
TOsRR/IPKJHR1jMd4s1j4Uk9BtGNbKiyJ1P7Uc3dWxmTEDKY+yqEtVtnjzVziCM9
4XgatHoua0jsLGd4hOd3/ZIjiZzGQkp03cLkplWMQhdv7GleEsk=
=cixZ
-----END PGP SIGNATURE-----
Bump version to v0.5.0

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
7 files changed
tree: 2bc774fdb399ead4942fbed0e1f8c2513b1f5064
  1. .gitignore
  2. .goosarch
  3. .travis.yml
  4. .traviskey
  5. Dockerfile
  6. Gopkg.lock
  7. Gopkg.toml
  8. LICENSE
  9. Makefile
  10. README.md
  11. VERSION.txt
  12. bridge/
  13. create.go
  14. list.go
  15. main.go
  16. netutils/
  17. network/
  18. remove.go
  19. vendor/
  20. version/
README.md

netns

Travis CI GoDoc Github All Releases

Runc hook for setting up default bridge networking.

Installation

Binaries

For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/genuinetools/netns

Usage

$ netns -h
netns -  Runc hook for setting up default bridge networking.

Usage: netns <command>

Flags:

  --ipfile     file in which to save the containers ip address (default: .ip)
  --mtu        mtu for bridge (default: 1500)
  --state-dir  directory for saving state, used for ip allocation (default: /run/github.com/genuinetools/netns)
  --bridge     name for bridge (default: netns0)
  -d           enable debug logging (default: false)
  --iface      name of interface in the namespace (default: eth0)
  --ip         ip address for bridge (default: 172.19.0.1/16)

Commands:

  create   Create a network.
  ls       List networks.
  rm       Delete a network.
  version  Show the version information.

Place this in the Hooks.Prestart field of your runc config.

{
    ...
    "hooks": {
        "prestart": [
            {
                "path": "/path/to/netns"
            }
        ]
    },
    ...
}

List network namespaces

$ sudo netns ls
IP                  LOCAL VETH          PID                 STATUS
172.19.0.3          netnsv0-21635       21635               running
172.19.0.4          netnsv0-21835       21835               running
172.19.0.5          netnsv0-22094       22094               running
172.19.0.6          netnsv0-25996       25996               running