We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is possible to use ARG variables in a FROM so they need to be expanded before we try to validate it.
ARG
FROM
ARG version=latest FROM alpine:$version
$ docker build . Sending build context to Docker daemon 1.695MB Step 1/2 : ARG version=latest Step 2/2 : FROM alpine:$version latest: Pulling from library/alpine ff3a5c916c92: Pull complete Digest: sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0 Status: Downloaded newer image for alpine:latest ---> 3fd9065eaf02 Successfully built 3fd9065eaf02
$ dockerfile-utils lint Dockerfile.1 Line: 2 FROM alpine:$version ^^^^^^^^ Error: invalid reference format
Here are some other Dockerfiles that are also valid.
ARG version=atest FROM alpine:l$version
ARG atest=atest FROM alpine:l$atest
ARG DIGEST=sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0 FROM alpine@$DIGEST
The text was updated successfully, but these errors were encountered:
93b07e4
rcjsuen
No branches or pull requests
It is possible to use
ARG
variables in aFROM
so they need to be expanded before we try to validate it.Here are some other Dockerfiles that are also valid.
The text was updated successfully, but these errors were encountered: