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

Port gets flagged as an error if it refers to a build argument without a default value #3

Closed
rcjsuen opened this issue Jan 16, 2018 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Jan 16, 2018

FROM scratch
ARG ZOO_PORT
EXPOSE $ZOO_PORT
> dockerfile-utils lint Dockerfile
Line: 3
EXPOSE $ZOO_PORT
       ^^^^^^^^^
Error: Invalid containerPort: $ZOO_PORT

The validator is flagging an error because the variable can't be resolved to a value that makes sense for an EXPOSE instruction (as it resolves to nothing). However, as the value will be provided by the user when the Docker image is built, the argument should just be outright ignored by the validator as we should assume that the value provided by the user is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant