{"id":37190771,"url":"https://github.com/jsok/libnetwork-plugin","last_synced_at":"2026-01-14T22:02:26.302Z","repository":{"id":57584737,"uuid":"133471574","full_name":"jsok/libnetwork-plugin","owner":"jsok","description":"Docker libnetwork plugin for Calico","archived":false,"fork":true,"pushed_at":"2019-02-12T20:53:38.000Z","size":1915,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T00:48:48.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.projectcalico.org","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"projectcalico/libnetwork-plugin","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsok.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":"2018-05-15T06:47:39.000Z","updated_at":"2018-05-15T06:47:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jsok/libnetwork-plugin","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/jsok/libnetwork-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Flibnetwork-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Flibnetwork-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Flibnetwork-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Flibnetwork-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsok","download_url":"https://codeload.github.com/jsok/libnetwork-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Flibnetwork-plugin/sbom","scorecard":{"id":538740,"data":{"date":"2025-08-11","repo":{"name":"github.com/jsok/libnetwork-plugin","commit":"86dfb97b72534f455cdd6eec19310bd5e98d9843"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: Dockerfile-ppc64le:1: pin your Docker image by updating ppc64le/alpine to ppc64le/alpine@sha256:44547def50c906a57ee186169015aee3c584f73a772eb8adca57b5449b1e66dc","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T07:40:23.222Z","repository_id":57584737,"created_at":"2025-08-20T07:40:23.222Z","updated_at":"2025-08-20T07:40:23.222Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T22:02:25.462Z","updated_at":"2026-01-14T22:02:26.216Z","avatar_url":"https://github.com/jsok.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://semaphoreci.com/api/v1/projects/d51a0276-7939-409e-80ac-aa5df9421fef/510521/badge.svg)](https://semaphoreci.com/calico/libnetwork-plugin)\n\n# Libnetwork plugin for Calico\n\nThis plugin for Docker networking ([libnetwork](https://github.com/docker/libnetwork)) is intended for use with [Project Calico](http://www.projectcalico.org).\nThe plugin is integrated with the `calico/node` image which is created from the [calicoctl](https://github.com/projectcalico/calicoctl) repository, but it can also be run in it's own Docker container or as a standalone binary.\n\nGuides on how to get started with the plugin and further documentation is available from http://docs.projectcalico.org\n\n## Supported options for confguration\n\n### Working with Networks\n* When creating a network, the `--subnet` option can be passed to `docker network create`. The subnet must match an existing Calico pool, and any containers created on that network will use an IP address from that Calico Pool.\n* Other than `--driver` and `--ipam-driver`, no other options are supported on the `docker network create` command.\n\n### Working with Containers\nWhen creating containers, use the `--net` option to connect them to a network previously created with `docker network create`\n\n* The `--ip` option can be passed to `docker run` to assign a specific IP to a container.\n* The `--mac` and `--link-local` options are currently unsupported.\n\n## Working with the code\n\n* Clone the repo (clone it into your GOPATH and make sure you use projectcalico in the path, not your fork name).\n* Create the vendor directory (`make vendor`). This uses `glide` in a docker container to create the vendor directory.\n* Build it in a container using `make dist/libnetwork-plugin`. The plugin binary will appear in the `dist` directory.\n* Running tests can be done in a container using `make test-containerized`. Note: This works on linux, but can require additional steps on Mac.\n* Submit PRs through GitHub. Before merging, you'll be asked to squash your commits together, so 1 PR = 1 commit.\n* Before submitting your PR, please make sure tests pass and run `make static-checks`. Both these will be done by the CI system too though.\n\n## How to Run It During Development\n`make run-plugin`\n\nRunning the plugin in a container requires a few specific options\n `docker run --rm --net=host --privileged -e CALICO_ETCD_AUTHORITY=$(LOCAL_IP_ENV):2379 -v /run/docker/plugins:/run/docker/plugins -v /var/run/docker.sock:/var/run/docker.sock --name calico-node-libnetwork calico/node-libnetwork /calico`\n\n- `--net=host` Host network is used since the network changes need to occur in the host namespace\n- `privileged` since the plugin creates network interfaces\n- `-e CALICO_ETCD_AUTHORITY=a.b.c.d:2379` to allow the plugin to find a backend datastore for storing information\n- `-v /run/docker/plugins:/run/docker/plugins` allows the docker daemon to discover the plugin\n- `-v /var/run/docker.sock:/var/run/docker.sock` allows the plugin to query the docker daemon\n\n## How to Test It\n\n### On Linux\n\n`make test` is all you need.\n\n### On OSX/Windows\n\nOn OSX/Windows you can't run Docker natively. To allow the Makefile to write the build libnetwork-plugin to your host's filesystem and to allow the test to access the Docker daemon via the unix socket, the user id and group id of the docker user are needed. For boot2docker the user id is 1000 and group id 100.\n\nRun `make test` like this: `LOCAL_USER_ID=1000 LOCAL_GROUP_ID=100 make test-containerized`\n\n\n\n## IPv6 Usage\n\n*Note: IPv4 can't be disabled, IPv6 is enabled in addition to IPv4.*\n\nDocker IPv6 support must be enabled e.g. \n```\ndockerd --cluster-store=etcd://127.0.0.1:2379 --ipv6 --fixed-cidr-v6=\"2001:db8:1::/64\"\n```\n\n### Start the libnetwork-plugin\n\n```\nsudo dist/libnetwork-plugin\n```\n\n### Add an IPv6 address to the host\n\n```\nsudo ip addr add fd80:24e2:f998:72d7::1/112 dev eth1\n```\n\n### Start calico/node, without using the calico/node libnetwork-plugin, also pass in the host IPv6 address\n\n```\nsudo calicoctl node run --disable-docker-networking --ip6=fd80:24e2:f998:72d7::1\n```\n\n### Create an IPv6 network\n\n```\ndocker network create --ipv6 -d calico --ipam-driver calico-ipam my_net\n```\n\n### Run containers on the IPv6 network\n\n```\n  docker run --net my_net --name workload-A -tid busybox\n  docker run --net my_net --name workload-B -tid busybox\n```\n\n\n### Check IPv6 network connectivity\n\n```\n  docker exec workload-A ping -6 -c 4 workload-B.my_net\n  docker exec workload-B ping -6 -c 4 workload-A.my_net\n```\n\n### Check IPv4 network connectivity\n\n```\n  docker exec workload-A ping -4 -c 4 workload-B.my_net\n  docker exec workload-B ping -4 -c 4 workload-A.my_net\n```\n\n\n## Known limitations\nThe following is a list of known limitations when using the Calico libnetwork\ndriver:\n-  It is not possible to add multiple networks to a single container.  However,\n   once a container endpoint is created, it is possible to manually add \n   additional Calico profiles to that endpoint (effectively adding the \n   container into another network).\n\n## Configuring\n\nTo change the prefix used for the interface in containers that Docker runs, set the `CALICO_LIBNETWORK_IFPREFIX` environment variable.\n\n* The default value is \"cali\"\n\nTo enable debug logging set the `CALICO_DEBUG` environment variable.\n\nThe plugin creates a Calico profile resource for the Docker network used (e.g. `docker run --net \u003cnetwork\u003e ...`). This is enabled by default. It can be disabled by setting the environment: `CALICO_LIBNETWORK_CREATE_PROFILES=false`.\n\nThe plugin can copy Docker container labels to the corresponding Calico workloadendpoint. This feature is disabled by default. It can be enabled by setting the environment: `CALICO_LIBNETWORK_LABEL_ENDPOINTS=true`.\n\n## Workloadendpoint labelling\nIf you want to use Calico policies you need labels on the Calico workloadendpoint. The plugin can set labels by copying a subset of the Docker container labels.\n\nTo enable this feature you need to set the environment: `CALICO_LIBNETWORK_LABEL_ENDPOINTS=true`.\n\nOnly container labels starting with `org.projectcalico.label.` are used. This prefix is removed and the remaining key is used a label key in the workloadendpoint.\n\nExample: `docker run --label org.projectcalico.label.foo=bar --net \u003ccalico network\u003e \u003cimage\u003e ...` will create a workloadendpoint with label `foo=bar`. Of course you can use multiple `--label org.projectcalico.label.\u003ckey\u003e=\u003cvalue\u003e` options.\n\n\n*NOTE:* the labels are added to the workloadendpoint using an update, because the container information is not available at the moment the workloadendpoint resource is created.\n\n## Troubleshooting\n\n### Logging\nLogs are sent to STDOUT. If using Docker these can be viewed with the \n`docker logs` command.\n\n### Monitoring\n\nCheck the plugin health by executing API calls.\n\nNetworkDriver:\n\n```\n# echo -e \"GET /NetworkDriver.GetCapabilities HTTP/1.0\\r\\n\\r\\n\" | nc -U /run/docker/plugins/calico.sock\nHTTP/1.0 200 OK\nContent-Type: application/vnd.docker.plugins.v1.1+json\nDate: Thu, 08 Dec 2016 10:00:41 GMT\nContent-Length: 19\n\n{\"Scope\":\"global\"}\n```\n\nIpamDriver:\n\n```\n# echo -e \"GET /IpamDriver.GetCapabilities HTTP/1.0\\r\\n\\r\\n\" | nc -U /run/docker/plugins/calico-ipam.sock\nHTTP/1.0 200 OK\nContent-Type: application/vnd.docker.plugins.v1.1+json\nDate: Thu, 08 Dec 2016 10:02:51 GMT\nContent-Length: 29\n\n{\"RequiresMACAddress\":false}\n```\n\n[![Analytics](https://calico-ga-beacon.appspot.com/UA-52125893-3/libnetwork-plugin/README.md?pixel)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsok%2Flibnetwork-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsok%2Flibnetwork-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsok%2Flibnetwork-plugin/lists"}