dockerfile_lint icon indicating copy to clipboard operation
dockerfile_lint copied to clipboard

Incorrect linting on FROM command

Open asears opened this issue 4 years ago • 2 comments

Should this throw an error? The commands ran successfully when building.

--------ERRORS---------

Line 5: -> FROM mcr.microsoft.com/azure-functions/java:$VERSION AS installer-env
ERROR: Invalid parameters for command..
Reference -> https://docs.docker.com/engine/reference/builder/


Line 97: -> FROM mcr.microsoft.com/azure-functions/java:3.0-java8-appservice AS appservice-env
ERROR: Invalid parameters for command..
Reference -> https://docs.docker.com/engine/reference/builder/

ARG is provided before the FROM for $VERSION.

Reference #85

asears avatar Jun 18 '20 12:06 asears

I had the same issue. In my case, it was related to the image name that follows the AS (appservice-env in your case). The '-' was not supported by the rule regexp.

image name should respect 'w+' regexp pattern (as defined in the rule) which does not expect a '-' character.

asanglard avatar Sep 29 '20 12:09 asanglard

Is there any update with this? I am also having the same issue.

[2021-02-16T02:02:08.163Z] --------ERRORS--------- [2021-02-16T02:02:08.163Z] [2021-02-16T02:02:08.163Z] Line 2: -> FROM ${ECR_ENDPOINT}/spring-boot:8.232-corretto-23 [2021-02-16T02:02:08.163Z] ERROR: Invalid parameters for command.. [2021-02-16T02:02:08.163Z] Reference -> https://docs.docker.com/engine/reference/builder/

adrianbance avatar Feb 18 '21 05:02 adrianbance