github.com/ijc/docker-app@v0.6.1-0.20181012090447-c7ca8bc483fb/specification/README.md (about) 1 # Docker App Package Specification 2 3 This section describes all the requirements for interoperability. 4 5 ## YAML Documents 6 7 A Docker App Package is a set of 3 YAML documents: 8 * `metadata` 9 * `docker-compose` 10 * `settings` 11 12 These documents can be split in 3 different files or merged into one YAML file, using the [multi document YAML feature](http://yaml.org/spec/1.2/spec.html#id2760395). 13 The order of the documents in a multi-documents YAML is **strict**: 14 1. metadata 15 1. docker-compose 16 1. settings 17 18 ### metadata.yml 19 20 `metadata.yml` defines some informations to describe the application in a standard `YAML` file. 21 See [JSON Schemas](schemas/) for validation. 22 23 ### docker-compose.yml 24 25 `docker-compose.yml` is a standard [Compose file](https://docs.docker.com/compose/compose-file/) with variable replacement. 26 `Compose` minimum version is **v3.2**, see [JSON Schemas](https://github.com/docker/cli/tree/master/cli/compose/schema/data) for validation. 27 28 ### settings.yml 29 30 `settings.yml` is a simple Key-Value file used to replace the variables defined in the `docker-compose` file. As it is an open document, there is no schema for this one. 31 32 ## Validation 33 34 Use the `validate` command: 35 ``` 36 Checks the rendered application is syntactically correct 37 38 Usage: 39 docker-app validate [<app-name>] [-s key=value...] [-f settings-file...] [flags] 40 41 Flags: 42 -h, --help help for validate 43 -s, --set stringArray Override settings values 44 -f, --settings-files stringArray Override settings files 45 ``` 46 47 Here is an example: 48 49 ```sh 50 # Init an empty docker application package, with an invalid mail for a maintainer 51 $ docker-app init my-app --maintainer "name:invalid#mail.com" 52 # Try to validate the application package 53 $ docker-app validate my-app 54 Error: failed to validate metadata: 55 - maintainers.0.email: Does not match format 'email' 56 57 # Fix the metadata file 58 $ vi my-app.dockerapp/metadata.yml 59 # And re-try validation 60 $ docker-app validate my-app 61 $ echo $? 62 0 63 ```