v0.3.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAlpLYR0ACgkQGPNoXAAi
v/PhQw/5ATr3iz0M379Qh/66xWZdq0u1nLn/wl9DOaQhhW4U3KnaC6A3++jlDWfz
BiC9BTp1zkf+fOvirSM6R7PCIBW9woYDKuF+hKuZs0vvC+Zf3Qmc8F9DHxRIHoC/
SySRUxNus+zQKSCV5SgPIUEXWFfyQZSSnCAPkgLO5eah/N2XXgMOpNLCs9Zm9zad
ET5UfOvYmcu2oQ4HCaQghMvpcIi1d1nqtwn4qz4O3J0TonBFNTd9dma4hW+DSPZA
RVvfUDIOGxotAlvF5c8Wt4YNCR23OAKyimITbyYUyT469lv4j9OwAyj+TZiieyMy
4CmSnUej6tuSDwFGpdM5vHnfbmdrgQ5+gqCrbFDejJ9hdNOjCWa6jWYbHiE28zpJ
9sVIvWgLrxaO/Qf7GLvxM+weUKMq97o5L0lT2Eh19cqhneKUnMC53grvshsRDvy3
NugfmJnpnkFuZTiSIVfAubSAQzRs2X5WicMSViO8Etm2WQZtQeuvXVWhpoqlUCe+
qrn5G1jKOlgikj47iiKDQ/hUtouE4fXMvC8l5SmbVIa/9GXnJNp6tB84qNjf8rzT
M1TITKES8hoJofuAsA3mG/Z3szxEEVFnfQ58H2xUZtiBnyEdptAKian7ZyqK0QYC
Z1de7vXGGTG1YJWK6wtBEAXo8Y53WSn6djPb/XM5d0SAHfdwOhE=
=xfEh
-----END PGP SIGNATURE-----
Bump version to v0.3.0

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: 637d93fc0acb5071788720785bf1d1ded4639e5a
  1. .gitignore
  2. .travis.yml
  3. Dockerfile
  4. Gopkg.lock
  5. Gopkg.toml
  6. LICENSE
  7. Makefile
  8. README.md
  9. VERSION
  10. bridge.go
  11. interface.go
  12. ipallocator/
  13. list.go
  14. main.go
  15. vendor/
  16. version/
README.md

netns

Travis CI

Runc hook for setting up default bridge networking.

Installation

Binaries

Via Go

$ go get github.com/jessfraz/netns

Usage

$ netns --help
            _
 _ __   ___| |_ _ __  ___
| '_ \ / _ \ __| '_ \/ __|
| | | |  __/ |_| | | \__ \
|_| |_|\___|\__|_| |_|___/

 Runc hook for setting up default bridge networking.
 Version: v0.1.0

  -bridge string
        name for bridge (default "netns0")
  -d    run in debug mode
  -iface string
        name of interface in the namespace (default "eth0")
  -ip string
        ip address for bridge (default "172.19.0.1/16")
  -ipfile string
        file in which to save the containers ip address (default ".ip")
  -mtu int
        mtu for bridge (default 1500)
  -v    print version and exit (shorthand)
  -version
        print version and exit

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