Open
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
pass linting
Actual behavior
error:
[
{
"code": "DL1000",
"column": 39,
"file": "repo1/gitlab-base/Dockerfile",
"level": "error",
"line": 40,
"message": "unexpected ':'\nexpecting '@', '\\', a new line followed by the next instruction, or the image tag"
}
]
Steps to reproduce the behavior
use variable expression in a Dockerfile:
# hadolint ignore=DL1000
FROM ${BASE_REGISTRY:-}${BASE_REGISTRY:+/}${BASE_IMAGE}:${BASE_TAG}
most basic would be:
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.0
Dockerfile (if relevant)
ARG BASE_REGISTRY=
ARG BASE_IMAGE=alpine
ARG BASE_TAG=latest
FROM ${BASE_REGISTRY:-}${BASE_REGISTRY:+/}${BASE_IMAGE}:${BASE_TAG}
Additional environment details (OS, stack version, etc.)
Metadata
Metadata
Assignees
Labels
No labels