Conversation
- Dockerfile: static Go binary on alpine:3.21, Go 1.26 builder - .dockerignore: excludes test data (rpki.json ~82MB, MRT files) and build artifacts - .github/workflows/docker.yml: multi-arch build (8 platforms) pushed to ghcr.io on main/tags - .github/workflows/release.yml: cross-platform release binaries (30+ targets) on tags - docs/docker.md: Docker quick start, volume mounts, port forwarding, compose examples - docs/quickstart.md: tabbed install section (Docker / Binary / Go) - mkdocs.yml: Docker nav entry - README.md: Docker badge and Docker as first install option Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds Docker distribution and documentation updates for bgpipe, along with CI workflows for building/publishing images and releases, and a small set of dependency bumps.
Changes:
- Add a multi-arch Docker image build (Dockerfile + GH Actions workflow) and new Docker documentation.
- Add a tag-based GitHub Release workflow for cross-compiled binaries.
- Update MkDocs navigation/metadata and refresh installation instructions across docs/README.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Adds Docker page to nav; adds site description metadata. |
| docs/docker.md | New Docker guide with run/compose examples and build instructions. |
| docs/quickstart.md | Switches installation section to tabbed options (Docker/Binary/Go install). |
| docs/index.md | Adds front-matter description and updates the Quick Demo to use Docker. |
| README.md | Adds Docker + release badges and updates installation section with Docker-first flow. |
| Dockerfile | New multi-stage scratch image build for a static bgpipe binary. |
| .github/workflows/docker.yml | New CI workflow to build/push multi-arch image to GHCR. |
| .github/workflows/release.yml | New CI workflow to build cross-platform binaries and create GitHub Releases. |
| .dockerignore | New ignore rules for slimming Docker build context. |
| go.mod / go.sum | Bumps klauspost/compress, x/crypto, x/sys, x/term checksums/versions. |
| docs/filters.md | Documentation updates for additional operator examples and compatibility notes. |
| docs/flowspec.md | Documentation updates to IPv6 prefix-with-offset example and operator type description. |
| .gitignore | Ignores local dev/vendor-like dirs and temp files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ```bash | ||
| $ bgpipe -go \ | ||
| $ docker run --rm ghcr.io/bgpfix/bgpipe:latest bgpipe -go \ |
There was a problem hiding this comment.
The Docker quick-demo command includes an extra bgpipe argument (docker run ... bgpipe -go ...). Because the image sets ENTRYPOINT ["/bgpipe"], the command name should not be repeated; as written, the binary will receive bgpipe as its first CLI arg and likely fail. Remove the redundant bgpipe so args start with -go (or other flags/stages).
| $ docker run --rm ghcr.io/bgpfix/bgpipe:latest bgpipe -go \ | |
| $ docker run --rm ghcr.io/bgpfix/bgpipe:latest -go \ |
.github/workflows/release.yml
Outdated
| echo "Building $out ..." | ||
| env CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM="$arm" \ | ||
| go build -ldflags="$LDFLAGS" -trimpath -o "$out" . \ | ||
| && echo " OK $(du -sh $out | cut -f1)" \ | ||
| || echo " SKIP (unsupported)" |
There was a problem hiding this comment.
The go build ... && echo ... || echo "SKIP" construct masks all build failures (including real compilation errors) and makes the job succeed even when no artifacts are produced. Consider failing the workflow on build errors, and only skipping targets after explicitly detecting unsupported GOOS/GOARCH combinations.
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: "1.26" |
There was a problem hiding this comment.
This workflow pins Go to 1.26, but go.mod specifies go 1.24.0 and toolchain go1.24.3. With the toolchain directive, go may download 1.24.3 anyway (slower, extra failure mode). Align setup-go to the toolchain version (or update go.mod toolchain/go directive if 1.26 is the new baseline).
| go-version: "1.26" | |
| go-version: "1.24.3" |
| FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder | ||
|
|
There was a problem hiding this comment.
The builder image uses golang:1.26-alpine, but go.mod declares go 1.24.0 with toolchain go1.24.3. This can cause the build to download a different toolchain at runtime (slower and potentially brittle in restricted build environments). Consider using a golang:1.24.x-alpine builder image (or updating go.mod toolchain/go directive if 1.26 is intended).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - `vX.Y.Z` - specific release | ||
| - `vX.Y` - latest patch of a minor release |
There was a problem hiding this comment.
This doc claims release tags are published as vX.Y.Z and vX.Y, but the Docker workflow currently generates semver tags without a v prefix (e.g. 1.2.3, 1.2). Either update this doc to match the actual pushed tag format, or update the workflow tagging configuration to add a v prefix.
| - `vX.Y.Z` - specific release | |
| - `vX.Y` - latest patch of a minor release | |
| - `X.Y.Z` - specific release | |
| - `X.Y` - latest patch of a minor release |
| tags: | | ||
| type=ref,event=branch | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=raw,value=latest,enable={{is_default_branch}} |
There was a problem hiding this comment.
The metadata-action semver tags here will be emitted without the v prefix even when the git tag is vX.Y.Z, which conflicts with the Docker docs claiming vX.Y.Z/vX.Y image tags. If you want v-prefixed image tags, configure metadata-action to include a v prefix (or adjust the docs to match the non-prefixed tags).
| ### IPv6 Prefix with Offset | ||
|
|
||
| IPv6 Flowspec prefixes can include a bit offset: | ||
|
|
||
| ```json | ||
| "DST": "2001:db8::/32/0-32" | ||
| "DST": "2001:db8::/0-32" | ||
| ``` | ||
|
|
||
| Format: `address/length/offset-length` where offset is the bit position to start matching from. | ||
| Format: `address/offset-length` where offset is the bit position to start matching from. |
There was a problem hiding this comment.
The IPv6 Flowspec prefix-with-offset example/value format looks inconsistent with the rest of the document: "2001:db8::/0-32" no longer includes a prefix length (contrast with earlier examples like 192.0.2.0/24). If the intended syntax is still address/prefixlen/offset-length, the example and format string should be reverted/adjusted; otherwise clarify how the prefix length is specified/derived.
No description provided.