-
-
Save austince/c1e3b729590ecc43fd2d016a11b01954 to your computer and use it in GitHub Desktop.
json schema to validate Dockerrun.aws.json Version 2 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://gist.githubusercontent.com/austince/c1e3b729590ecc43fd2d016a11b01954/raw/c03c33aa57707880f5413d841bda9e3de2a7595e/dockerrun-v2-json-schema.json", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"description": "AWS Dockerrun.aws.json v2 schema", | |
"type": "object", | |
"additionalProperties": false, | |
"required": [ | |
"AWSEBDockerrunVersion", | |
"containerDefinitions" | |
], | |
"properties": { | |
"AWSEBDockerrunVersion": { | |
"const": 2 | |
}, | |
"authentication": { | |
"type": "object", | |
"required": [ | |
"bucket", | |
"key" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"bucket": { | |
"type": "string" | |
}, | |
"key": { | |
"type": "string" | |
} | |
} | |
}, | |
"volumes": { | |
"type": "array", | |
"description": "Creates volumes from folders in the Amazon EC2 container instance, or from your source bundle (deployed to /var/app/current).", | |
"items": { | |
"type": "object", | |
"required": [ | |
"name", | |
"host" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"host": { | |
"type": "object", | |
"required": [ | |
"sourcePath" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"sourcePath": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"containerDefinitions": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": [ | |
"name", | |
"image" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"$ref": "#/definitions/ContainerName" | |
}, | |
"image": { | |
"$ref": "#/definitions/ContainerName" | |
}, | |
"memory": { | |
"type": "integer", | |
"description": "Amount of memory on the container instance to reserve for the container. Specify a non-zero integer for one or both of the memory or memoryReservation parameters in container definitions." | |
}, | |
"essential": { | |
"type": "boolean", | |
"description": "True if the task should stop if the container fails. Nonessential containers can finish or crash without affecting the rest of the containers on the instance." | |
}, | |
"mountPoints": { | |
"type": "array", | |
"description": "Volumes from the Amazon EC2 container instance to mount, and the location on the Docker container file system at which to mount them.", | |
"items": { | |
"type": "object", | |
"required": [ | |
"sourceVolume", | |
"containerPath", | |
"readOnly" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"sourceVolume": { | |
"type": "string" | |
}, | |
"containerPath": { | |
"type": "string" | |
}, | |
"readOnly": { | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"portMappings": { | |
"type": "array", | |
"description": "Maps network ports on the container to ports on the host.", | |
"items": { | |
"type": "object", | |
"required": ["containerPort", "hostPort"], | |
"additionalProperties": false, | |
"properties": { | |
"containerPort": { | |
"type": "integer", | |
"minimum": 0 | |
}, | |
"hostPort": { | |
"type": "integer", | |
"minimum": 0 | |
} | |
} | |
} | |
}, | |
"environment": { | |
"type": "array", | |
"description": "An array of environment variables to pass to the container.", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"volumesFrom": { | |
"type": "array", | |
"description": "Mount all of the volumes from a different container.", | |
"items": { | |
"type": "object", | |
"required": [ | |
"sourceContainer" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"sourceContainer": { | |
"$ref": "#/definitions/ContainerName" | |
} | |
} | |
} | |
}, | |
"links": { | |
"type": "array", | |
"description": "List of containers to link to. Linked containers can discover each other and communicate securely.", | |
"items": { | |
"$ref": "#/definitions/ContainerName" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"ContainerName": { | |
"type": "string", | |
"description": "The name of the container.", | |
"maxLength": 255, | |
"minLength": 1 | |
}, | |
"ImageName": { | |
"type": "string", | |
"description": "The name of a Docker image in an online Docker repository from which you're building a Docker container.", | |
"maxLength": 255, | |
"minLength": 1 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment