docker: add multi-platform Alpine image, CI pipeline, and test suite#461
Open
ssam18 wants to merge 1 commit into
Open
docker: add multi-platform Alpine image, CI pipeline, and test suite#461ssam18 wants to merge 1 commit into
ssam18 wants to merge 1 commit into
Conversation
Adds everything needed to build, test, and publish a minimal Snort 3 Docker image across five architectures. Closes snort3#460
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #460.
What this adds
Dockerfilefour-stage build producing a minimal (~30–50 MB) Alpine runtime image with no compiler, headers, or build tools in the final layer.-devheaders (shared across all builder stages)make checkbuild fails if any test fails.github/workflows/docker.ymlCI pipeline with one job per platform running in parallel. Each job follows this exact sequence and any failure blocks the next step:docker build: unit tests run here inside the Dockerfiletest-docker.shsections A B C, T01–T36)After all five platform jobs succeed, a manifest merge job combines the per-platform digests into a single multi-arch
latesttag.scripts/test-docker.sh40 integration tests across five sections:--live)scripts/trivy-scan.shstandalone scan script; auto-installs Trivy if not present, outputs table/JSON/SARIF reports.Platform support
amd64 and arm64 use native GitHub runners; ppc64le, arm/v7, and 386 use QEMU.
Testing
All 40 tests pass on linux/amd64, linux/arm64, and linux/arm/v7. Unit tests (162 tests via CppUTest) pass on all three platforms with zero failures.
The arm/v7 functional build depends on #459 being merged first, or
SNORT_REPO/SNORT_BRANCHbuild args pointing to a branch that includes that fix.