{"id":13688711,"url":"https://github.com/hemslo/docker-bpf","last_synced_at":"2026-02-02T13:51:49.989Z","repository":{"id":148802829,"uuid":"544456698","full_name":"hemslo/docker-bpf","owner":"hemslo","description":"Run ebpf programs in docker (e.g., bpftrace)","archived":false,"fork":false,"pushed_at":"2022-10-06T11:17:25.000Z","size":10,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-12T12:48:27.137Z","etag":null,"topics":["bpf","docker","ebpf"],"latest_commit_sha":null,"homepage":"https://hemslo.io/run-ebpf-programs-in-docker-using-docker-bpf/","language":"Shell","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/hemslo.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}},"created_at":"2022-10-02T14:27:53.000Z","updated_at":"2024-09-18T10:14:53.000Z","dependencies_parsed_at":"2023-05-30T17:30:23.550Z","dependency_job_id":null,"html_url":"https://github.com/hemslo/docker-bpf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemslo%2Fdocker-bpf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemslo%2Fdocker-bpf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemslo%2Fdocker-bpf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemslo%2Fdocker-bpf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemslo","download_url":"https://codeload.github.com/hemslo/docker-bpf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251940348,"owners_count":21668518,"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":["bpf","docker","ebpf"],"created_at":"2024-08-02T15:01:20.753Z","updated_at":"2026-02-02T13:51:49.924Z","avatar_url":"https://github.com/hemslo.png","language":"Shell","funding_links":[],"categories":["docker"],"sub_categories":[],"readme":"# docker-bpf\n\n`docker-bpf` is a tool to help you run your BPF programs in Docker containers.\n\nIt will automatically mount linuxkit kernel headers, BTF and debugfs into the container.\nSo you can run BPF programs in Docker Desktop for Mac/Windows(WSL), and Linux of course.\n\nDetails can be found in [this blog post](https://hemslo.io/run-ebpf-programs-in-docker-using-docker-bpf/).\n\n## Usage\n\n### Default\n\n```shell\ndocker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/hemslo/docker-bpf:latest\n```\n\nBy default, it will launch a container with bcc and bpftrace installed.\n\n### With your own BPF image\n\nIf you already packaged your program in docker image, you can set the `BPF_IMAGE` environment variable to use that image instead.\n\n```shell\ndocker run --rm -ti -e BPF_IMAGE=quay.io/iovisor/bpftrace:latest -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/hemslo/docker-bpf:latest\n```\n\nNote you need to make sure the image matches the architecture of the host.\nFor example, if you are running on a M1/M2 Mac, you need to use `arm64` image.\n\n### With additional arguments\n\nAdditional commands can be passed to the container.\n\n```shell\ndocker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/hemslo/docker-bpf:latest bpftrace --info\n```\n\n### With data volume mount\n\nAdditional data can be mounted into the container by setting `DATA_MOUNT` environment variable.\n\n```shell\ndocker run --rm -ti -e DATA_MOUNT=$PWD:/data -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/hemslo/docker-bpf:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemslo%2Fdocker-bpf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemslo%2Fdocker-bpf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemslo%2Fdocker-bpf/lists"}