feat: add Dockerfile validation to pre-commit hooks
Added custom Dockerfile validation script that detects mismatches between base image OS (Debian vs Alpine) and package managers (apt vs apk). This will catch errors like: - Using golang:latest (Debian) with apk commands - Using alpine images with apt commands The hook runs automatically on commit and would have caught the recent golang:latest + apk mismatch that caused Docker build failures.
This commit is contained in:
@@ -27,3 +27,11 @@ repos:
|
||||
exclude: '^(frontend/(coverage|dist|node_modules|\.vite)/|.*\.tsbuildinfo$)'
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: dockerfile-check
|
||||
name: dockerfile validation
|
||||
entry: tools/dockerfile_check.sh
|
||||
language: script
|
||||
files: "Dockerfile.*"
|
||||
pass_filenames: true
|
||||
|
||||
Reference in New Issue
Block a user