zavoloklom / docker-compose-linter

A command-line tool for validating and enforcing best practices in Docker Compose files.
MIT License
13 stars 1 forks source link

Invalid port range #8

Closed smares closed 1 month ago

smares commented 1 month ago
file:///dclint/dist/util/service-ports-parser.js:21
        throw new Error('Invalid port range');
              ^

Error: Invalid port range
    at parsePortsRange (file:///dclint/dist/util/service-ports-parser.js:21:15)
    at file:///dclint/dist/rules/no-duplicate-exported-ports-rule.js:37:42
    at Array.forEach (<anonymous>)
    at file:///dclint/dist/rules/no-duplicate-exported-ports-rule.js:35:25
    at Array.forEach (<anonymous>)
    at NoDuplicateExportedPortsRule.check (file:///dclint/dist/rules/no-duplicate-exported-ports-rule.js:25:24)
    at file:///dclint/dist/linter/linter.js:24:39
    at Array.forEach (<anonymous>)
    at DCLinter.lintContent (file:///dclint/dist/linter/linter.js:23:20)
    at file:///dclint/dist/linter/linter.js:100:43

when using on docker-compose.yml files with environment variable as port mapping.

zavoloklom commented 1 month ago

@smares Could you please provide a sample of docker-compose file that cause this error?

zavoloklom commented 1 month ago

@smares fixed in v1.0.3