Slim Docker image packaging yaml-lint
579
Yaml Lint based on j13k/yaml-lint
To lint a single YAML file:
docker run -v $PWD:/workdir --workdir /workdir --rm bestit/qa-yaml-lint:1.1.6 path/to/file.yaml
To scan and lint all YAML files in a directory, use the lint-yaml-files.sh script:
docker run -v $PWD:/workdir --workdir /workdir --rm bestit/qa-yaml-lint:1.1.6 lint-yaml-files.sh [directory]
The script will:
.yaml and .yml files in the specified directory (defaults to current directory)You can exclude files from linting using the --ignore-file option with a regex pattern:
docker run -v $PWD:/workdir --workdir /workdir --rm bestit/qa-yaml-lint:1.1.6 lint-yaml-files.sh . --ignore-file "node_modules" --ignore-file "vendor"
Multiple --ignore-file patterns can be specified, and they will be combined with OR logic.
The build is using a docker multi stage build. To release a new version the following steps are required:
tool_version in Dockerfile (amd64) and Dockerfile.arm64v8 (arm64v8)multi-arch-manifest.yaml for both platforms.To test the Dockerfiles locally you can execute this command to build the image on amd64 and arm64 architectures:
docker buildx build --force-rm --no-cache -t qa-yaml-lint --platform linux/arm64,linux/amd64 . && docker run -it qa-yaml-lint
Content type
Image
Digest
sha256:424c71fa0…
Size
34.3 MB
Last updated
10 months ago
docker pull bestit/qa-yaml-lint:1.1.7