Skip to content

Dev0212 docker etc.#30

Merged
pforemski merged 10 commits intomainfrom
dev0212-docker
Feb 12, 2026
Merged

Dev0212 docker etc.#30
pforemski merged 10 commits intomainfrom
dev0212-docker

Conversation

@pforemski
Copy link
Copy Markdown
Contributor

No description provided.

pforemski and others added 5 commits February 12, 2026 11:50
- 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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 \
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
$ docker run --rm ghcr.io/bgpfix/bgpipe:latest bgpipe -go \
$ docker run --rm ghcr.io/bgpfix/bgpipe:latest -go \

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +41
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)"
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26"
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
go-version: "1.26"
go-version: "1.24.3"

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +8 to +9
- `vX.Y.Z` - specific release
- `vX.Y` - latest patch of a minor release
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- `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

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +49
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines 91 to +99
### 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.
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@pforemski pforemski merged commit 34dd9f9 into main Feb 12, 2026
1 check passed
@pforemski pforemski deleted the dev0212-docker branch February 12, 2026 12:41
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.

2 participants