-
Notifications
You must be signed in to change notification settings - Fork 487
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
Docker has some build checks, which may raise warnings when building images that are incorrect or inconsistent in some way; see also https://docs.docker.com/reference/build-checks/.
The FromAsCasing check tests whether or not the FROM and AS keywords are consistently using the same casing in any instruction. If this is not consistent, recent Docker versions (tested on 27.0.1) issue a warning FromAsCasing: 'as' and 'FROM' keywords' casing do not match.
However, hadolint does not report any error on a Dockerfile violating this rule. I would expect it to do so, given it is a pattern
Actual behavior
Building with docker reports a warning, hadolint does not.
Steps to reproduce the behavior
- Create Dockerfile as listed below and run
hadolint: no warning appears - Build Dockerfile with Docker 27.0.1: warning appears
Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:
hadolint --version
> Haskell Dockerfile Linter 2.12.0Dockerfile (if relevant)
FROM debian:latest as builderAdditional environment details (OS, stack version, etc.)
N/A