Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate: Check configuration against JSON Schema
runtime-spec publishes a JSON Schema covering the configuration format (and other JSON related to runtime-spec) [1]. Reduce duplication of effort by validating configurations against that schema. For example this gives us lots of range checking: $ ocitools validate ... 1. linux.resources.oomScoreAdj: Must be greater than or equal to -1000 ... without us having to duplicate all the range-input work that the runtime-spec folks have already done for us. Only validating the JSON Schema is not sufficient, because --host-specific (e.g. you're running on a Linux box) and cross-property constraits (e.g. must create a new UTS namespace if you set hostname) are difficult/impossible to express in JSON Schema. [1]: https://github.com/opencontainers/runtime-spec/tree/v1.0.0-rc1/schema Signed-off-by: W. Trevor King <wking@tremily.us>
- Loading branch information