Skip to content

Commit 9554b0d

Browse files
docs: align documentation and comments with implementation
- Use Containerfile terminology in builder.sh hadolint message - Fix comment typos (trailing backslashes) in builder.sh and install_tools.sh - Reorder README release workflow so hadolint runs before build - Run hadolint with .hadolint.yaml in builder.sh to match release workflow - Add files: ^Containerfile$ to pre-commit hadolint hook - Add CHANGELOG.md and install-man-page.sh to project structure - Note that local install may use different tool versions than image/CI Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 76980ea commit 9554b0d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ repos:
1414
hooks:
1515
- id: hadolint-docker
1616
args: ["--config", ".hadolint.yaml"]
17+
files: ^Containerfile$
1718

1819
- repo: https://github.com/shellcheck-py/shellcheck-py
1920
rev: v0.10.0.1

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ When a new version is determined, the release workflow:
6262

6363
1. Creates a GitHub release with auto-generated notes
6464
2. Updates `CHANGELOG.md`
65-
3. Builds the image with `buildah` (OCI format, squashed layers)
66-
4. Runs `hadolint` lint validation
65+
3. Validates the Containerfile with hadolint
66+
4. Builds the image with `buildah` (OCI format, squashed layers)
6767
5. Runs `dive` filesystem efficiency scan
6868
6. Runs `trivy` vulnerability scan (HIGH/CRITICAL)
6969
7. Pushes to GHCR with semver tags: `1.2.3`, `1.2`, `1`, `latest`
@@ -87,6 +87,8 @@ Install [Docker](https://docs.docker.com/get-docker/), then install the build to
8787
./scripts/install_tools.sh
8888
```
8989

90+
Local install may use different (e.g. latest) versions for some tools than the pinned versions in the image and CI.
91+
9092
### Configuration
9193

9294
Build configuration is defined in `manifest.yaml`:
@@ -177,6 +179,8 @@ git commit -m "WIP"
177179
.
178180
├── Containerfile # Multi-stage container definition
179181
├── manifest.yaml # Build configuration and metadata
182+
├── CHANGELOG.md # Generated by semantic-release
183+
├── install-man-page.sh # Optional: install yq man page locally
180184
├── .releaserc.yaml # Semantic release configuration
181185
├── .hadolint.yaml # Hadolint configuration
182186
├── .commitlintrc.yaml # Commitlint configuration

scripts/builder.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ clean_build_dir(){
4747
hadolint_validate(){
4848
local hadolint_exec
4949
local hadolint_exit_code
50-
log_info "Validating Dockerfile with hadolint"
50+
log_info "Validating Containerfile with hadolint"
5151
${CLI} pull -q ghcr.io/hadolint/hadolint:latest > /dev/null
5252
log_trace "$(${CLI} run --rm -i hadolint/hadolint:latest hadolint -v)"
5353

5454
set +e
5555
hadolint_exec=$(
56-
${CLI} run --rm -i hadolint/hadolint:latest < Containerfile \
56+
${CLI} run --rm -i -v "$(pwd)/.hadolint.yaml:/.hadolint.yaml:ro" hadolint/hadolint:latest hadolint --config /.hadolint.yaml - < Containerfile \
5757
2>&1
5858
)
5959
hadolint_exit_code=$?
@@ -312,7 +312,7 @@ trivy_scan () {
312312

313313
# Main
314314
clean_build_dir
315-
check_for_manifest # Check for manifest file existence\
315+
check_for_manifest # Check for manifest file existence
316316
IMAGE_NAME=$(retrieve_name_from_manifest) # Retrieve image name from manifest
317317

318318
log_info "Starting build process"

scripts/install_tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sudo apt-get install trivy -y
2727
# Install buildah
2828
sudo apt-get install buildah -y
2929

30-
# Install yq\
30+
# Install yq
3131
VERSION="v4.45.4"
3232
BINARY="yq_linux_amd64"
3333
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\

0 commit comments

Comments
 (0)