Skip to content

Fix docker-compile -o flag passed to docker instead of container#61

Merged
gregclermont merged 1 commit into
mainfrom
fix-docker-compile-output-flag
Jan 23, 2026
Merged

Fix docker-compile -o flag passed to docker instead of container#61
gregclermont merged 1 commit into
mainfrom
fix-docker-compile-output-flag

Conversation

@gregclermont
Copy link
Copy Markdown
Owner

Summary

  • Fixed bug where -o/--output flag was passed as a docker argument instead of being passed to the container's entrypoint
  • Updated entrypoint.sh to accept -o flag in any position (before or after sources)
  • Updated docs to use more intuitive src/*.bpf.c -o build/ ordering

Fixes #60

Test plan

  • Tested locally with tinybpf docker-compile -v --output dist/bpf/ tests/bpf/minimal.bpf.c
  • Built docker image locally and verified both orderings work:
    • src/*.bpf.c -o build/
    • -o build/ src/*.bpf.c
  • All pre-commit hooks pass (ruff, ruff-format, mypy)

🤖 Generated with Claude Code

The -o/--output flag was being placed before the image name in the
docker run command, causing docker to interpret it as a docker flag
rather than an argument for the container's entrypoint.

Changes:
- CLI: Place -o flag after image and sources
- entrypoint.sh: Replace getopts with manual parsing to accept -o
  in any position (before or after sources)
- Docs: Update examples to use more intuitive `src/*.bpf.c -o build/`
  ordering

Fixes #60

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gregclermont gregclermont merged commit c6c69cc into main Jan 23, 2026
2 checks passed
@gregclermont gregclermont deleted the fix-docker-compile-output-flag branch January 23, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker-compile: -o/--output flag passed to docker instead of container

1 participant