{"id":26509914,"url":"https://github.com/markcda/rustycan4docker","last_synced_at":"2026-05-21T14:15:20.512Z","repository":{"id":282060761,"uuid":"947313207","full_name":"markcda/rustycan4docker","owner":"markcda","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-12T15:05:52.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T16:22:28.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/markcda.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T13:47:00.000Z","updated_at":"2025-03-12T15:05:56.000Z","dependencies_parsed_at":"2025-03-12T16:22:36.612Z","dependency_job_id":"cae4c2af-a3fb-4651-ac25-3094cab2aa99","html_url":"https://github.com/markcda/rustycan4docker","commit_stats":null,"previous_names":["markcda/rustycan4docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcda%2Frustycan4docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcda%2Frustycan4docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcda%2Frustycan4docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcda%2Frustycan4docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markcda","download_url":"https://codeload.github.com/markcda/rustycan4docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244722689,"owners_count":20499151,"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":[],"created_at":"2025-03-21T01:38:17.160Z","updated_at":"2026-05-21T14:15:20.464Z","avatar_url":"https://github.com/markcda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VXCAN Network Plugin for Docker\n\nThis Docker plugin provides the ability to create VXCAN tunnels for Docker containers. It is based heavily on the work by Christain Gagneraud (https://gitlab.com/chgans/can4docker) and Wiktor S. Ovalle Correa (https://github.com/wsovalle/docker-vxcan).\n\nThis plugin has essentially taken the Python implementation and rewrote it in Rust as a way for me to learn Rust and to speed up the plugin startup time, which on an embedded system was way too long when written in Python.\n\n## Requirements\n\nRequires that the vxcan and can-gw modules are built-in or loaded into the kernel.\n```\nsudo modprobe vxcan\nsudo modprobe can-gw\n```\n\n## Available Options\n**vxcan.id**: Numerical identifier of the interface (i.e., 0 for can0, or 1 for can1). Default is 0.\n\n**vxcan.dev**: Specify the CAN device to use on the host. If the device is present (i.e., a physical CAN device) then it will be used as is; otherwise, a virtual CAN interface is created to use. Default is 'vcan'.\n\n**vxcan.peer**: Prefix for the peer device (i.e., endpoint) to use in the container. This is combined with the vxcan.id to produce an interface name (e.g., vxcanp0). Default is 'vcanp'.\n\n## Usage\n\n### Docker\n```\n# Create a couple Docker containers to test in separate terminals\ndocker run --rm -it --name a1 alpine\ndocker run --rm -it --name a2 alpine\n\n# Create the network\ndocker network create --driver rustyvxcan -o vxcan.dev=vcan -o vxcan.id=0 -o vxcan.peer=vxcanp rust_can1\n\n# Connect the network to the containers\ndocker network connect rust_can1 a1\ndocker network connect rust_can1 a2\n\n# Check that the cangw rules are present (twelve total)\ncangw -L\n\n# Check that the required interfaces are present (one vcan0, 2 vxcanXXXXXXXX)\nip link\n\n# In the container terminals\napk add can-utils\ncangen vxcanp0 # from one container\ncandump vxcanp0 # from the other container\ncangen vcan0 # from the host\n\n# Remove the network (after closing the containers)\ndocker network rm rust_can1\n```\n\n### Compose Application\ndocker-compose applications can make use of the plugin as well.\n```\nnetworks:\n  canbus:\n    driver: rustyvxcan\n    driver_opts:\n      vxcan.dev: can\n      vxcan.peer: can\n      vxcan.id: 0\n```\n\n### Plugin Installation\n```\nPLUGIN_NAME=\"vxcan4docker\" ./docker-plugin/build-plugin.sh\ndocker plugin enable vxcan4docker\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcda%2Frustycan4docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkcda%2Frustycan4docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcda%2Frustycan4docker/lists"}