A recursive alias is a collection that contains itself. The reader now stops at 64 levels of nesting and reports the file, so the command still prints its validation report.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
A few nested aliases can describe millions of values; the reader now stops at 100000 and reports the file instead of using up memory. Only true and false are booleans, so a service named on, off, yes or no keeps its name.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
config validate read the file without resolving anchors, aliases or merge keys, so a service built from an anchor looked empty and a valid file got two errors and exit 1. The file is now read with its anchors resolved, the way Compose reads it. snakeyaml was already on the classpath through Jackson's YAML module and is now declared, since it is used directly.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(config): validate Compose files by their structure, with -o json and three more checks
config validate now parses the Compose file and checks the emulator's own service: any host port mapped to the emulator port is accepted (5566:4566 was rejected), -o json and -o yaml report the findings, and it flags a read-only or file-bound data volume, a data volume without persistent storage mode (and the reverse), and an image tag older than the supported minimum.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(config): check the socket target, TCP mappings and bind types, and report unparsable files as JSON
The socket has to land at /var/run/docker.sock in the container, a UDP mapping no longer counts, a long-form bind with a bare name is checked as a path, an env_file makes the storage mode unknown, and a file that cannot be parsed still gets a structured report.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>