specification

package
Version: v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

README

Docker App Package Specification

This section describes all the requirements for interoperability.

YAML Documents

A Docker App Package is a set of 3 YAML documents:

  • metadata
  • docker-compose
  • settings

These documents can be split in 3 different files or merged into one YAML file, using the multi document YAML feature. The order of the documents in a multi-documents YAML is strict:

  1. metadata
  2. docker-compose
  3. settings
metadata.yml

metadata.yml defines some informations to describe the application in a standard YAML file.
See JSON Schemas for validation.

docker-compose.yml

docker-compose.yml is a standard Compose file with variable replacement.
Compose minimum version is v3.2, see JSON Schemas for validation.

settings.yml

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.

Validation

Use the validate command:

Checks the rendered application is syntactically correct

Usage:
  docker-app validate [<app-name>] [-s key=value...] [-f settings-file...] [flags]

Flags:
  -h, --help                         help for validate
  -s, --set stringArray              Override settings values
  -f, --settings-files stringArray   Override settings files

Here is an example:

# Init an empty docker application package, with an invalid mail for a maintainer
$ docker-app init my-app --maintainer "name:invalid#mail.com"
# Try to validate the application package
$ docker-app validate my-app
Error: failed to validate metadata:
- maintainers.0.email: Does not match format 'email'

# Fix the metadata file
$ vi my-app.dockerapp/metadata.yml
# And re-try validation
$ docker-app validate my-app
$ echo $?
0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(config map[string]interface{}, version string) error

Validate uses the jsonschema to validate the configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL