Skip to content
New issue

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

Ignore predefined platform ARG variables if they are used as a base image #119

Closed
rcjsuen opened this issue Sep 10, 2023 · 0 comments
Closed
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Sep 10, 2023

FROM alpine as amd64
FROM alpine as arm
FROM ${TARGETARCH}

Given a Dockerfile like the above, it is possible to build the Docker image but we flag it as an error because we cannot resolve ${TARGETARCH}. As it is one of the prepopulated variables, we should allow it to go through since an appropriate build stage may have been defined by the user.

$ dockerfile-utils lint
Line: 3
FROM ${TARGETARCH}
     ^^^^^^^^^^^^^
Error: base name (${TARGETARCH}) should not be blank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant