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.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
repos:
|
|
- repo: https://github.com/psf/black
|
|
rev: 24.3.0
|
|
hooks:
|
|
- id: black
|
|
language_version: python3
|
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
rev: v0.14.5
|
|
hooks:
|
|
- id: ruff
|
|
args: ["--fix"]
|
|
- repo: local
|
|
hooks:
|
|
- id: python-compile
|
|
name: python compile check
|
|
entry: tools/python_compile_check.sh
|
|
language: script
|
|
files: ".*\\.py$"
|
|
pass_filenames: false
|
|
always_run: true
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: end-of-file-fixer
|
|
exclude: '^(frontend/(coverage|dist|node_modules|\.vite)/|.*\.tsbuildinfo$)'
|
|
- id: trailing-whitespace
|
|
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
|