dockerfilelint
dockerfilelint copied to clipboard
Add support for ENV $VAR; EXPOSE $VAR pattern
This pattern allows us to define a variable and then re-use it in multiple areas in order to keep our Dockerfile DRY. Under the current implementation; dockerfilelint will state "Invalid Port Exposed"
Somewhat related to #78.
As a simple example:
FROM nginx:latest
ENV PORT=3000
EXPOSE $PORT
The current output is:
Line 319: EXPOSE "${service_ports}"
Issue Category Title Description
1 Possible Bug Invalid Port Exposed Exposing ports should only be valid port numbers.
... which is fine so far as it goes, but there should be a way to hide this warning with a linter ignore= directive.