{
    "$id": "https://example.com/product.schema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "docker-seq",
    "description": "The schema for `docker-seq`",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "image": {
            "type": "string",
            "description": "The docker image name"
        },
        "workdir": {
            "type": "string",
            "description": "Working directory inside the container"
        },
        "user": {
            "type": "string",
            "description": "Username or UID (format: <name|uid>[:<group|gid>])"
        },
        "local_user": {
            "type": "boolean",
            "description": "Disables the `user` option and runs the container with the hosts uid and gid."
        },
        "tty": {
            "type": "boolean",
            "description": "Allocate a pseudo-TTY"
        },
        "interactive": {
            "type": "boolean",
            "description": "Keep STDIN open even if not attached"
        },
        "pull": {
            "type": "string",
            "description": "Pull image before running (\"always\"|\"missing\"|\"never\") (default \"missing\")",
            "enum": [
                "always",
                "missing",
                "never"
            ]
        },
        "rm": {
            "type": "boolean",
            "description": "Automatically remove the container when it exits"
        },
        "init": {
            "type": "boolean",
            "description": "Run an init inside the container that forwards signals and reaps processes"
        },
        "volumes": {
            "type": "array",
            "description": "Bind mount volumes"
        },
        "publish": {
            "type": "array",
            "description": "Publish a container's port(s) to the host"
        },
        "env": {
            "type": "array",
            "description": "Set environment variables"
        },
        "env_file": {
            "type": "array",
            "description": "Read in files of environment variables"
        },
        "cpus": {
            "type": "string",
            "description": "Number of CPUs"
        },
        "memory": {
            "type": "integer",
            "description": "Memory limit in bytes"
        },
        "entrypoint": {
            "type": "string",
            "description": "Overwrite the default ENTRYPOINT of the image"
        },
        "name": {
            "type": "string",
            "description": "Assign a name to the container"
        },
        "privileged": {
            "type": "boolean",
            "description": "Give extended privileges to this container"
        },
        "network": {
            "type": "string"
        },
        "mount": {
            "type": "array",
            "description": "Attach a filesystem mount to the container"
        },
        "read_only": {
            "type": "boolean",
            "description": "Mount the container's root filesystem as read only"
        },
        "platform": {
            "type": "string",
            "description": "Set platform if server is multi-platform capable"
        },
        "runtime": {
            "type": "string",
            "description": "Runtime to use for this container"
        },
        "security_opt": {
            "type": "array",
            "description": "Security Options"
        },
        "ulimit": {
            "type": "string",
            "description": "Ulimit options"
        },
        "volumes_from": {
            "type": "array",
            "description": "Mount volumes from the specified container(s)"
        },
        "background_task": {
            "type": "array",
            "description": "Task with which to keep the container alive while executing commands"
        },
        "docker_exec_shell": {
            "type": "array",
            "description": "Shell in which to execute each sequence step command"
        },
        "sequence": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/Step"
            }
        }
    },
    "definitions": {
        "Step": {
            "type": "object",
            "description": "One step in the command sequence",
            "additionalProperties": false,
            "properties": {
                "workdir": {
                    "type": "string",
                    "description": "Working directory inside the container"
                },
                "user": {
                    "type": "string",
                    "description": "Username or UID (format: <name|uid>[:<group|gid>])"
                },
                "local_user": {
                    "type": "boolean",
                    "description": "Disables the `user` option and executes these commands with the hosts uid and gid."
                },
                "tty": {
                    "type": "boolean",
                    "description": "Allocate a pseudo-TTY"
                },
                "privileged": {
                    "type": "boolean",
                    "description": "Give extended privileges to the commands"
                },
                "interactive": {
                    "type": "boolean",
                    "description": "Keep STDIN open even if not attached"
                },
                "commands": {
                    "type": "array",
                    "description": "A list of commands to execute within the container"
                }
            }
        }
    }
}