v0.5.1
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAltNFM8ACgkQGPNoXAAi
v/Mj6A//bHu8zWZex5DnONi12SfYHADOTJchapVR9jqoXa3UsZOA/++K2L16Behd
rnYfcrvpjYNdgHccIdP1RiS2D4AllUAlpdZDBC3WT/jPkwfmRWKHZ4w7tOwMuy1D
wk/xdhT/c2R+VXrvu4e0CBi43lV0lMMWLNXnj7hIWBNExKy6tG8zwPqwHYDIsZ/q
ny4pIxDtVchoYP+Gs2dgElBu9TGq3aBrppmdZmkkAdO47+Jj3UQhAuP16y77M6CY
XA0Y9GpGR6KTm7+nLghXfgggGh+wmdaf4GY1xaHoDj1ipJFUhLsZMFovjECrVEJy
QsahNYTDPP9/p2lsEoY/3MwLtCzaAB8kjiC/g0Vyi1o/NVbzGCgGMyvD4qUVqads
yVzU6c1Wu9AO5YQUOd7owO4mN48aB1GleQV+tCoK3jKo3xZ5SE88nAt+lDAWqFXG
eCFTwbAjZ7vqD9nnH+Hr7o39WxlekaP+m3qrzMLmggJmPhyMTRSOLpn3X+X0gie0
gfYiFDg6yVcYUR3FMyiig8zrn2Q0NejcowQcnKE1+FG7D8+Zt0Z3bFKXsJXsvGKo
JiN6oWga984XQbfm+IyIflagw1iMlPWc0DjFoe1VMEkQ7gOGM7Flt+Lk2km/f0L0
04yGsN84NDeTra7Q5YVj9WEFXsQWZufxYZtB7PDKPi4vTlhTJU0=
=TPIx
-----END PGP SIGNATURE-----
Bump version to v0.5.1

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
1 file changed
tree: 6401978f1f7c1dd27fc4d6419cec119b34e4fa3e
  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