{"id":13562995,"url":"https://github.com/genuinetools/netns","last_synced_at":"2025-04-04T18:10:01.269Z","repository":{"id":47614297,"uuid":"49686016","full_name":"genuinetools/netns","owner":"genuinetools","description":"Runc hook (OCI compatible) for setting up default bridge networking for containers.","archived":false,"fork":false,"pushed_at":"2021-08-21T18:22:37.000Z","size":4448,"stargazers_count":224,"open_issues_count":6,"forks_count":37,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-28T17:11:25.514Z","etag":null,"topics":["cli","containers","linux","netns","opencontainers","runc","runc-hook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genuinetools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-15T01:07:01.000Z","updated_at":"2024-09-23T19:05:19.000Z","dependencies_parsed_at":"2022-07-21T16:45:08.539Z","dependency_job_id":null,"html_url":"https://github.com/genuinetools/netns","commit_stats":null,"previous_names":["jessfraz/netns","jfrazelle/netns"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genuinetools%2Fnetns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genuinetools%2Fnetns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genuinetools%2Fnetns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genuinetools%2Fnetns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genuinetools","download_url":"https://codeload.github.com/genuinetools/netns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","containers","linux","netns","opencontainers","runc","runc-hook"],"created_at":"2024-08-01T13:01:14.085Z","updated_at":"2025-04-04T18:10:01.246Z","avatar_url":"https://github.com/genuinetools.png","language":"Go","readme":"# netns\n\n[![make-all](https://github.com/genuinetools/netns/workflows/make%20all/badge.svg)](https://github.com/genuinetools/netns/actions?query=workflow%3A%22make+all%22)\n[![make-image](https://github.com/genuinetools/netns/workflows/make%20image/badge.svg)](https://github.com/genuinetools/netns/actions?query=workflow%3A%22make+image%22)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge)](https://godoc.org/github.com/genuinetools/netns)\n[![Github All Releases](https://img.shields.io/github/downloads/genuinetools/netns/total.svg?style=for-the-badge)](https://github.com/genuinetools/netns/releases)\n\nRunc hook for setting up default bridge networking.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Installation](#installation)\n    - [Binaries](#binaries)\n    - [Via Go](#via-go)\n- [Usage](#usage)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation\n\n#### Binaries\n\nFor installation instructions from binaries please visit the [Releases Page](https://github.com/genuinetools/netns/releases).\n\n#### Via Go\n\n```console\n$ go get github.com/genuinetools/netns\n```\n\n## Usage\n\n```console\n$ netns -h\nnetns -  Runc hook for setting up default bridge networking.\n\nUsage: netns \u003ccommand\u003e\n\nFlags:\n\n  --ipfile     file in which to save the containers ip address (default: .ip)\n  --mtu        mtu for bridge (default: 1500)\n  --state-dir  directory for saving state, used for ip allocation (default: /run/github.com/genuinetools/netns)\n  --bridge     name for bridge (default: netns0)\n  -d           enable debug logging (default: false)\n  --iface      name of interface in the namespace (default: eth0)\n  --ip         ip address for bridge (default: 172.19.0.1/16)\n\nCommands:\n\n  create   Create a network.\n  ls       List networks.\n  rm       Delete a network.\n  version  Show the version information.\n```\n\nPlace this in the `Hooks.Prestart` field of your `runc` config.\n\n```json\n{\n    ...\n    \"hooks\": {\n        \"prestart\": [\n            {\n                \"path\": \"/path/to/netns\"\n            }\n        ]\n    },\n    ...\n}\n```\n\n**List network namespaces**\n\n```console\n$ sudo netns ls\nIP                  LOCAL VETH          PID                 STATUS\n172.19.0.3          netnsv0-21635       21635               running\n172.19.0.4          netnsv0-21835       21835               running\n172.19.0.5          netnsv0-22094       22094               running\n172.19.0.6          netnsv0-25996       25996               running\n```\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenuinetools%2Fnetns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenuinetools%2Fnetns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenuinetools%2Fnetns/lists"}