package
0.4.1
Repository: https://github.com/vdemeester/app.git
Documentation: pkg.go.dev

# 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