github.com/docker/app@v0.9.1-beta3.0.20210611140623-a48f773ab002/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  * `parameters`
    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. parameters
    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  ### parameters.yml
    29  
    30  `parameters.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  Options:
    39    -f, --parameters-file stringArray   Override with parameters from file
    40    -s, --set stringArray               Override parameters values
    41  ```
    42  
    43  Here is an example:
    44  
    45  ```sh
    46  # Init an empty docker application package, with an invalid mail for a maintainer
    47  $ docker-app init my-app --maintainer "name:invalid#mail.com"
    48  # Try to validate the application package
    49  $ docker-app validate my-app
    50  Error: failed to validate metadata:
    51  - maintainers.0.email: Does not match format 'email'
    52  
    53  # Fix the metadata file
    54  $ vi my-app.dockerapp/metadata.yml
    55  # And re-try validation
    56  $ docker-app validate my-app
    57  $ echo $?
    58  0
    59  ```