Conversation
Use cc-debian12 distroless image for full compatibility with dynamically linked C/C++ dependencies required by Hugo Extended. It includes glibc and libstdc++ to support the CGO build. Signed-off-by: Constantin-Cătălin Cojocaru <catalincojocaru4@gmail.com>
- Measure root file system size using du -sh - Scan for vulnerabilities using Trivy - Validate output using curl and grep Signed-off-by: Constantin-Cătălin Cojocaru <catalincojocaru4@gmail.com>
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.
Description
Added a Hugo base example using the distroless container image
gcr.io/distroless/cc-debian12, which provides a minimal runtime environment. This example utilizes a multi-stage build, starting withgolang:1.21.3-bookwormto compile the Hugo static site generator with PIE support (-buildmode=pie), bootstraps a new site using theananketheme, and selectively copies the compiled/go/bin/hugobinary and the generated site files into the final distroless image.The
README.mdfile contains instructions for building and running the example manually.Automated Testing
This PR contains a three-stage workflow to build and test this example via GitHub Actions:
curland matching the HTTP200status codeNote on Vulnerability Scanning:
Trivy scans are configured to pass by explicitly ignoring specific vulnerabilities via
.trivyignore. An extensive list of CVEs and GHSAs (includingCVE-2026-14456and various Go/dependency-specific security alerts) are ignored. This is safe as they affect features, upstream libraries, or Debian components that this simple local static site server does not implement, utilize, or expose in its minimal execution environment.