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

Add support for ENV $VAR; EXPOSE $VAR pattern #86

Open
thomasbiddle opened this issue Sep 12, 2017 · 2 comments
Open

Add support for ENV $VAR; EXPOSE $VAR pattern #86

thomasbiddle opened this issue Sep 12, 2017 · 2 comments

Comments

@thomasbiddle
Copy link

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.

@thomasbiddle
Copy link
Author

As a simple example:

FROM nginx:latest

ENV PORT=3000
EXPOSE $PORT

@srcshelton
Copy link

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.

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

No branches or pull requests

2 participants