{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/generic-worker/multiuser_posix.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "definitions": {
    "artifact": {
      "additionalProperties": false,
      "properties": {
        "expires": {
          "format": "date-time",
          "title": "Date when artifact should expire must be in the future.",
          "type": "string"
        },
        "path": {
          "title": "Location of artifact in container, as an absolute path.",
          "type": "string"
        },
        "type": {
          "enum": [
            "file",
            "directory",
            "volume"
          ],
          "title": "Artifact upload type.",
          "type": "string"
        }
      },
      "required": [
        "type",
        "path"
      ],
      "title": "Docker Worker Artifact",
      "type": "object"
    },
    "content": {
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "Requires scope `queue:get-artifact:<artifact-name>`.\n\nSince: generic-worker 5.4.0",
          "properties": {
            "artifact": {
              "maxLength": 1024,
              "type": "string"
            },
            "sha256": {
              "description": "If provided, the required SHA256 of the content body.\n\nSince: generic-worker 10.8.0",
              "pattern": "^[a-f0-9]{64}$",
              "title": "SHA 256",
              "type": "string"
            },
            "taskId": {
              "pattern": "^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$",
              "type": "string"
            }
          },
          "required": [
            "taskId",
            "artifact"
          ],
          "title": "Artifact Content",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Content originating from a task artifact that has been indexed by the Taskcluster Index Service.\n\nSince: generic-worker 51.0.0",
          "properties": {
            "artifact": {
              "maxLength": 1024,
              "type": "string"
            },
            "namespace": {
              "maxLength": 255,
              "type": "string"
            }
          },
          "required": [
            "namespace",
            "artifact"
          ],
          "title": "Indexed Content",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "URL to download content from.\n\nSince: generic-worker 5.4.0",
          "properties": {
            "sha256": {
              "description": "If provided, the required SHA256 of the content body.\n\nSince: generic-worker 10.8.0",
              "pattern": "^[a-f0-9]{64}$",
              "title": "SHA 256",
              "type": "string"
            },
            "url": {
              "description": "URL to download content from.\n\nSince: generic-worker 5.4.0",
              "format": "uri",
              "title": "URL",
              "type": "string"
            }
          },
          "required": [
            "url"
          ],
          "title": "URL Content",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
          "properties": {
            "raw": {
              "description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
              "maxLength": 65536,
              "title": "Raw",
              "type": "string"
            }
          },
          "required": [
            "raw"
          ],
          "title": "Raw Content",
          "type": "object"
        },
        {
          "additionalProperties": false,
          "description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0",
          "properties": {
            "base64": {
              "description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0",
              "maxLength": 65536,
              "pattern": "^[A-Za-z0-9/+]+[=]{0,2}$",
              "title": "Base64",
              "type": "string"
            }
          },
          "required": [
            "base64"
          ],
          "title": "Base64 Content",
          "type": "object"
        }
      ]
    },
    "fileMount": {
      "additionalProperties": false,
      "properties": {
        "content": {
          "$ref": "#/definitions/content",
          "description": "Content of the file to be mounted.\n\nSince: generic-worker 5.4.0"
        },
        "file": {
          "description": "The filesystem location to mount the file. This can be a\npath relative to the task directory, or an absolute path.\nThe file will be created as the task user, so the target\nlocation must be writable by the task user.\n\nSince: generic-worker 5.4.0",
          "title": "File",
          "type": "string"
        },
        "format": {
          "description": "Compression format of the preloaded content.\n\nSince: generic-worker 55.3.0",
          "enum": [
            "br",
            "bz2",
            "gz",
            "lz",
            "lz4",
            "mz",
            "sz",
            "xz",
            "zst",
            "zz"
          ],
          "title": "Format",
          "type": "string"
        }
      },
      "required": [
        "file",
        "content"
      ],
      "title": "File Mount",
      "type": "object"
    },
    "mount": {
      "oneOf": [
        {
          "$ref": "#/definitions/fileMount"
        },
        {
          "$ref": "#/definitions/writableDirectoryCache"
        },
        {
          "$ref": "#/definitions/readOnlyDirectory"
        }
      ],
      "title": "Mount"
    },
    "readOnlyDirectory": {
      "additionalProperties": false,
      "properties": {
        "content": {
          "$ref": "#/definitions/content",
          "description": "Contents of read only directory.\n\nSince: generic-worker 5.4.0",
          "title": "Content"
        },
        "directory": {
          "description": "The filesystem location to mount the directory volume.\nThis can be a path relative to the task directory, or an\nabsolute path. The directory will be created as the task\nuser, so the target location must be writable by the task\nuser.\n\nSince: generic-worker 5.4.0",
          "title": "Directory",
          "type": "string"
        },
        "format": {
          "description": "Archive format of content for read only directory.\n\nSince: generic-worker 5.4.0",
          "enum": [
            "7z",
            "rar",
            "tar",
            "tar.br",
            "tar.bz2",
            "tar.gz",
            "tar.lz",
            "tar.lz4",
            "tar.mz",
            "tar.sz",
            "tar.xz",
            "tar.zst",
            "tar.zz",
            "zip"
          ],
          "title": "Format",
          "type": "string"
        }
      },
      "required": [
        "directory",
        "content",
        "format"
      ],
      "title": "Read Only Directory",
      "type": "object"
    },
    "writableDirectoryCache": {
      "additionalProperties": false,
      "dependencies": {
        "content": [
          "format"
        ],
        "format": [
          "content"
        ]
      },
      "properties": {
        "cacheName": {
          "description": "Implies a read/write cache directory volume. A unique name for the\ncache volume. Requires scope `generic-worker:cache:<cache-name>`.\nNote if this cache is loaded from an artifact, you will also require\nscope `queue:get-artifact:<artifact-name>` to use this cache.\n\nSince: generic-worker 5.4.0",
          "title": "Cache Name",
          "type": "string"
        },
        "content": {
          "$ref": "#/definitions/content",
          "description": "Optional content to be preloaded when initially creating the cache\n(if set, `format` must also be provided).\n\nSince: generic-worker 5.4.0",
          "title": "Content"
        },
        "directory": {
          "description": "The filesystem location to mount the directory volume.\nThis can be a path relative to the task directory, or an\nabsolute path. The directory will be created as the task\nuser, so the target location must be writable by the task\nuser.\n\nSince: generic-worker 5.4.0",
          "title": "Directory Volume",
          "type": "string"
        },
        "format": {
          "description": "Archive format of the preloaded content (if `content` provided).\n\nSince: generic-worker 5.4.0",
          "enum": [
            "7z",
            "rar",
            "tar",
            "tar.br",
            "tar.bz2",
            "tar.gz",
            "tar.lz",
            "tar.lz4",
            "tar.mz",
            "tar.sz",
            "tar.xz",
            "tar.zst",
            "tar.zz",
            "zip"
          ],
          "title": "Format",
          "type": "string"
        }
      },
      "required": [
        "directory",
        "cacheName"
      ],
      "title": "Writable Directory Cache",
      "type": "object"
    }
  },
  "oneOf": [
    {
      "additionalProperties": false,
      "description": "This schema defines the structure of the `payload` property referred to in a\nTaskcluster Task definition.",
      "properties": {
        "artifacts": {
          "description": "Artifacts to be published.\n\nSince: generic-worker 1.0.0",
          "items": {
            "additionalProperties": false,
            "properties": {
              "contentEncoding": {
                "description": "Content-Encoding for the artifact. If not provided, `gzip` will be used, except for the\nfollowing file extensions, where `identity` will be used, since they are already\ncompressed:\n\n* 7z\n* aab\n* apk\n* bz2\n* deb\n* dmg\n* flv\n* gif\n* gz\n* jar\n* jpeg\n* jpg\n* npz\n* pkg\n* png\n* swf\n* tbz\n* tgz\n* wasm\n* webp\n* whl\n* woff\n* woff2\n* xpi\n* xz\n* zip\n* zst\n\nNote, setting `contentEncoding` on a directory artifact will apply the same content\nencoding to all the files contained in the directory.\n\nSince: generic-worker 16.2.0",
                "enum": [
                  "identity",
                  "gzip"
                ],
                "title": "Content-Encoding header when serving artifact over HTTP.",
                "type": "string"
              },
              "contentType": {
                "description": "Explicitly set the value of the HTTP `Content-Type` response header when the artifact(s)\nis/are served over HTTP(S). If not provided (this property is optional) the worker will\nguess the content type of artifacts based on the filename extension of the file storing\nthe artifact content. It does this by looking at the system filename-to-mimetype mappings\ndefined in multiple `mime.types` files located under `/etc`. Note, setting `contentType`\non a directory artifact will apply the same contentType to all files contained in the\ndirectory.\n\nSee [mime.TypeByExtension](https://pkg.go.dev/mime#TypeByExtension).\n\nSince: generic-worker 10.4.0",
                "title": "Content-Type header when serving artifact over HTTP",
                "type": "string"
              },
              "expires": {
                "description": "Date when artifact should expire must be in the future, no earlier than task deadline, but\nno later than task expiry. If not set, defaults to task expiry.\n\nSince: generic-worker 1.0.0",
                "format": "date-time",
                "title": "Expiry date and time",
                "type": "string"
              },
              "name": {
                "description": "Name of the artifact, as it will be published. If not set, `path` will be used.\nConventionally (although not enforced) path elements are forward slash separated. Example:\n`public/build/a/house`. Note, no scopes are required to read artifacts beginning `public/`.\nArtifact names not beginning `public/` are scope-protected (caller requires scopes to\ndownload the artifact). See the Queue documentation for more information.\n\nSince: generic-worker 8.1.0",
                "title": "Name of the artifact",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "If `true`, the artifact is optional. If the file or directory\ndoesn't exist, the artifact won't be created.\n\nSince: generic-worker 83.1.0",
                "title": "Optional artifact",
                "type": "boolean"
              },
              "path": {
                "description": "Filesystem path of the file/directory relative to the\ntask directory, or an absolute path.\nExample: `dist\\regedit.exe`. It doesn't matter if\nforward slashes or backslashes are used.\n\nSince: generic-worker 1.0.0",
                "title": "Artifact location",
                "type": "string"
              },
              "type": {
                "description": "Artifacts can be either an individual `file` or a `directory` containing\npotentially multiple files with recursively included subdirectories.\n\nSince: generic-worker 1.0.0",
                "enum": [
                  "file",
                  "directory"
                ],
                "title": "Artifact upload type.",
                "type": "string"
              }
            },
            "required": [
              "type",
              "path"
            ],
            "title": "Artifact",
            "type": "object"
          },
          "title": "Artifacts to be published",
          "type": "array",
          "uniqueItems": true
        },
        "command": {
          "description": "One array per command (each command is an array of arguments). Several arrays\nfor several commands.\n\nSince: generic-worker 0.0.1",
          "items": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": false
          },
          "minItems": 1,
          "title": "Commands to run",
          "type": "array",
          "uniqueItems": false
        },
        "env": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Env vars must be string to __string__ mappings (not number or boolean). For example:\n```\n{\n  \"PATH\": \"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\",\n  \"GOOS\": \"darwin\",\n  \"FOO_ENABLE\": \"true\",\n  \"BAR_TOTAL\": \"3\"\n}\n```\n\nNote, the following environment variables will automatically be set in the task\ncommands, but may be overridden by environment variables in the task payload:\n  * `HOME` - the home directory of the task user\n  * `PATH` - `/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin`\n  * `USER` - the name of the task user\n\nThe following environment variables will automatically be set in the task\ncommands, and may not be overridden by environment variables in the task payload:\n  * `DISPLAY` - `:0` (Linux only, and only when `headlessTasks` is `false`)\n  * `TASK_ID` - the task ID of the currently running task\n  * `RUN_ID` - the run ID of the currently running task\n  * `TASK_WORKDIR` - the working directory of the currently running task\n  * `TASK_GROUP_ID` - the task group ID of the currently running task\n  * `TASKCLUSTER_ROOT_URL` - the root URL of the taskcluster deployment\n  * `TASKCLUSTER_PROXY_URL` (if taskcluster proxy feature enabled) - the\n    taskcluster authentication proxy for making unauthenticated taskcluster\n    API calls\n  * `TASK_USER_CREDENTIALS` (if payload feature `runTaskAsCurrentUser` set to\n    `true` in the task definition - the absolute file location of a\n    json file containing the current task OS user account name and password.\n    This is only useful for the generic-worker multiuser CI tasks, where\n    `runTaskAsCurrentUser` is set to `true`.\n  * `TASKCLUSTER_INSTANCE_TYPE` - the cloud instance type of the worker (optional, not all workers run in a cloud)\n  * `TASKCLUSTER_WORKER_LOCATION`. See\n    [RFC #0148](https://github.com/taskcluster/taskcluster-rfcs/blob/master/rfcs/0148-taskcluster-worker-location.md)\n    for details.\n\nSince: generic-worker 0.0.1",
          "title": "Env vars",
          "type": "object"
        },
        "features": {
          "additionalProperties": false,
          "description": "Feature flags enable additional functionality.\n\nSince: generic-worker 5.3.0",
          "properties": {
            "backingLog": {
              "default": true,
              "description": "The backing log feature publishes a task artifact containing the complete\nstderr and stdout of the task.\n\nSince: generic-worker 48.2.0",
              "title": "Enable backing log",
              "type": "boolean"
            },
            "chainOfTrust": {
              "description": "Artifacts named `public/chain-of-trust.json` and\n`public/chain-of-trust.json.sig` should be generated which will\ninclude information for downstream tasks to build a level of trust\nfor the artifacts produced by the task and the environment it ran in.\n\nSince: generic-worker 5.3.0\n\nTasks may inject additional data into the certificate by writing them\nas json to file chain-of-trust-additional-data.json in the task\ndirectory.\n\nSince: generic-worker 81.0.0",
              "title": "Enable generation of signed Chain of Trust artifacts",
              "type": "boolean"
            },
            "interactive": {
              "description": "This allows you to interactively run commands from within the worker\nas the task user. This may be useful for debugging purposes.\nCan be used for SSH-like access to the running worker.\nNote that this feature works differently from the `interactive` feature\nin docker worker, which `docker exec`s into the running container.\nSince tasks on generic worker are not guaranteed to be running in a\ncontainer, a bash shell is started on the task user's account.\nA user can then `docker exec` into the a running container, if there\nis one.\n\nSince: generic-worker 49.2.0",
              "title": "Interactive shell",
              "type": "boolean"
            },
            "liveLog": {
              "default": true,
              "description": "The live log feature streams the combined stderr and stdout to a task artifact\nso that the output is available while the task is running.\n\nSince: generic-worker 48.2.0",
              "title": "Enable [livelog](https://github.com/taskcluster/taskcluster/tree/main/tools/livelog)",
              "type": "boolean"
            },
            "loopbackAudio": {
              "description": "Audio loopback device created using snd-aloop.\nAn audio device will be available for the task. Its\nlocation will be `/dev/snd`. Devices inside that directory\nwill take the form `/dev/snd/controlC<N>`,\n`/dev/snd/pcmC<N>D0c`, `/dev/snd/pcmC<N>D0p`,\n`/dev/snd/pcmC<N>D1c`, and `/dev/snd/pcmC<N>D1p`,\nwhere <N> is an integer between 0 and 31, inclusive.\nThe Generic Worker config setting `loopbackAudioDeviceNumber`\nmay be used to change the device number in case the\ndefault value (`16`) conflicts with another\naudio device on the worker.\n\nThis feature is only available on Linux. If a task\nis submitted with this feature enabled on a non-Linux,\nposix platform (FreeBSD, macOS), the task will resolve as\n`exception/malformed-payload`.\n\nSince: generic-worker 54.5.0",
              "title": "Loopback Audio device",
              "type": "boolean"
            },
            "loopbackVideo": {
              "description": "Video loopback device created using v4l2loopback.\nA video device will be available for the task. Its\nlocation will be passed to the task via environment\nvariable `TASKCLUSTER_VIDEO_DEVICE`. The\nlocation will be `/dev/video<N>` where `<N>` is\nan integer between 0 and 255. The value of `<N>`\nis not static, and therefore either the environment\nvariable should be used, or `/dev` should be\nscanned in order to determine the correct location.\nTasks should not assume a constant value.\n\nThis feature is only available on Linux. If a task\nis submitted with this feature enabled on a non-Linux,\nposix platform (FreeBSD, macOS), the task will resolve as\n`exception/malformed-payload`.\n\nSince: generic-worker 53.1.0",
              "title": "Loopback Video device",
              "type": "boolean"
            },
            "resourceMonitor": {
              "default": true,
              "description": "The resource monitor feature reports Peak System Memory Used,\nAverage System Memory Used, Average Available System Memory,\nand Total System Memory in the task log for each task command\nexecuted. It also will abort any task command if the used\nsystem memory exceeds worker config maxMemoryUsagePercent\n_AND_ available system memory drops below worker config\nminAvailableMemoryBytes for longer than worker config\nallowedHighMemoryDuration seconds. When this happens, the\ntask will be resolved as failed.\n\nSince: generic-worker 83.4.0",
              "title": "Resource monitor",
              "type": "boolean"
            },
            "runTaskAsCurrentUser": {
              "description": "If `true`, task commands will be executed as the\nuser currently running Generic Worker (typically\n`root` or `LocalSystem`), rather than as the\ndedicated task user created for the task. The task\nuser account will still be created, and is\navailable for the task to use.\n\nRequires scope `generic-worker:run-task-as-current-user:<provisionerID>/<workerType>`.\nTasks submitted without this scope will be resolved\nas `exception/malformed-payload`.\n\nSince: generic-worker 81.0.0",
              "title": "Run task as current user",
              "type": "boolean"
            },
            "taskclusterProxy": {
              "description": "The taskcluster proxy provides an easy and safe way to make authenticated\ntaskcluster requests within the scope(s) of a particular task. See\n[the github project](https://github.com/taskcluster/taskcluster/tree/main/tools/taskcluster-proxy) for more information.\n\nSince: generic-worker 10.6.0",
              "title": "Run [taskcluster-proxy](https://github.com/taskcluster/taskcluster/tree/main/tools/taskcluster-proxy) to allow tasks to dynamically proxy requests to taskcluster services",
              "type": "boolean"
            }
          },
          "required": [],
          "title": "Feature flags",
          "type": "object"
        },
        "logs": {
          "additionalProperties": false,
          "description": "Configuration for task logs.\n\nSince: generic-worker 48.2.0",
          "properties": {
            "backing": {
              "default": "public/logs/live_backing.log",
              "description": "Specifies a custom name for the backing log artifact.\nThis is only used if `features.backingLog` is `true`.\n\nSince: generic-worker 48.2.0",
              "title": "Backing log artifact name",
              "type": "string"
            },
            "live": {
              "default": "public/logs/live.log",
              "description": "Specifies a custom name for the live log artifact.\nThis is only used if `features.liveLog` is `true`.\n\nSince: generic-worker 48.2.0",
              "title": "Live log artifact name",
              "type": "string"
            }
          },
          "required": [],
          "title": "Logs",
          "type": "object"
        },
        "maxRunTime": {
          "description": "Maximum time the task container can run in seconds.\nThe maximum value for `maxRunTime` is set by a `maxTaskRunTime` config property specific to each worker-pool.\n\nSince: generic-worker 0.0.1",
          "minimum": 1,
          "multipleOf": 1,
          "title": "Maximum run time in seconds",
          "type": "integer"
        },
        "mounts": {
          "description": "Directories and/or files to be mounted.\n\nSince: generic-worker 5.4.0",
          "items": {
            "$ref": "#/definitions/mount",
            "title": "Mount"
          },
          "type": "array",
          "uniqueItems": false
        },
        "onExitStatus": {
          "additionalProperties": false,
          "description": "By default tasks will be resolved with `state/reasonResolved`: `completed/completed`\nif all task commands have a zero exit code, or `failed/failed` if any command has a\nnon-zero exit code. This payload property allows customsation of the task resolution\nbased on exit code of task commands.",
          "properties": {
            "purgeCaches": {
              "description": "If the task exits with a purge caches exit status, all caches\nassociated with the task will be purged.\n\nSince: generic-worker 49.0.0",
              "items": {
                "minimum": 0,
                "title": "Exit statuses",
                "type": "integer"
              },
              "title": "Purge caches exit status",
              "type": "array",
              "uniqueItems": true
            },
            "retry": {
              "description": "Exit codes for any command in the task payload to cause this task to\nbe resolved as `exception/intermittent-task`. Typically the Queue\nwill then schedule a new run of the existing `taskId` (rerun) if not\nall task runs have been exhausted.\n\nSee [itermittent tasks](https://docs.taskcluster.net/docs/reference/platform/taskcluster-queue/docs/worker-interaction#intermittent-tasks) for more detail.\n\nSince: generic-worker 10.10.0",
              "items": {
                "minimum": 1,
                "title": "Exit codes",
                "type": "integer"
              },
              "title": "Intermittent task exit codes",
              "type": "array",
              "uniqueItems": true
            }
          },
          "required": [],
          "title": "Exit code handling",
          "type": "object"
        },
        "osGroups": {
          "description": "A list of OS Groups that the task user should be a member of.\n\nSince: generic-worker 6.0.0 (Windows)\nSince: generic-worker 54.4.0 (FreeBSD, Linux, macOS)",
          "items": {
            "type": "string"
          },
          "title": "OS Groups",
          "type": "array",
          "uniqueItems": true
        },
        "supersederUrl": {
          "description": "This property is allowed for backward compatibility, but is unused.",
          "title": "unused",
          "type": "string"
        },
        "taskclusterProxyInterface": {
          "default": "localhost",
          "description": "Specifies whether taskcluster-proxy should listen on\nlocalhost interface (default) or search for a docker bridge\ninterface (for tasks that wish to call the taskcluster\nproxy from inside a docker container that does not share\nthe host network).",
          "enum": [
            "localhost",
            "docker-bridge"
          ],
          "title": "Network Interface for Taskcluster Proxy to listen on",
          "type": "string"
        }
      },
      "required": [
        "command",
        "maxRunTime"
      ],
      "title": "Generic worker payload",
      "type": "object"
    },
    {
      "additionalProperties": false,
      "description": "`.payload` field of the queue.",
      "properties": {
        "artifacts": {
          "additionalProperties": {
            "$ref": "#/definitions/artifact"
          },
          "description": "Artifact upload map example: ```{\"public/build.tar.gz\": {\"path\": \"/home/worker/build.tar.gz\", \"expires\": \"2016-05-28T16:12:56.693817Z\", \"type\": \"file\"}}```\nArtifacts can be an individual `file`, a `directory` containing\npotentially multiple files with recursively included subdirectories,\nor a `volume` which will create a volume mount from the\nhost to the running container. Unlike `directory` artifacts, the\n`volume` directory will already exist as the task starts. Since the\nartifacts will be created directly on the host, they do not need to\nbe copied from the container to the host prior to being published,\nso perform more efficiently, and simplify the d2g-generated task payload.\nMoreover, in the case of time-critical spot terminations, tasks have\nmore chance of successfully publishing volume artifacts than directory\nartifacts, due to the efficiency gain.",
          "title": "Artifacts",
          "type": "object"
        },
        "cache": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Caches are mounted within the docker container at the mount point specified. Example: ```{ \"CACHE NAME\": \"/mount/path/in/container\" }```",
          "title": "Caches to mount point mapping.",
          "type": "object"
        },
        "capabilities": {
          "additionalProperties": false,
          "description": "Set of capabilities that must be enabled or made available to the task container Example: ```{ \"capabilities\": { \"privileged\": true }```",
          "properties": {
            "devices": {
              "additionalProperties": false,
              "description": "Allows devices from the host system to be attached to a task container similar to using `--device` in docker.",
              "properties": {
                "hostSharedMemory": {
                  "description": "Mount /dev/shm from the host in the container.",
                  "title": "Host shared memory device (Experimental)",
                  "type": "boolean"
                },
                "kvm": {
                  "description": "Mount /dev/kvm from the host in the container.",
                  "title": "/dev/kvm device (Experimental)",
                  "type": "boolean"
                },
                "loopbackAudio": {
                  "description": "Audio loopback device created using snd-aloop",
                  "title": "Loopback Audio device",
                  "type": "boolean"
                },
                "loopbackVideo": {
                  "description": "Video loopback device created using v4l2loopback.",
                  "title": "Loopback Video device",
                  "type": "boolean"
                }
              },
              "required": [],
              "title": "Devices to be attached to task containers",
              "type": "object"
            },
            "disableSeccomp": {
              "default": false,
              "description": "Allowed a task to run without seccomp, similar to running docker with `--security-opt seccomp=unconfined`.  This only worked for worker-types configured to enable it. NO LONGER SUPPORTED IN DOCKER WORKER, but payload still includes feature in order for d2g to work with it.",
              "title": "Container does not have a seccomp profile set. NO LONGER SUPPORTED IN DOCKER WORKER.",
              "type": "boolean"
            },
            "privileged": {
              "default": false,
              "description": "Allows a task to run in a privileged container, similar to running docker with `--privileged`.  This only works for worker-types configured to enable it.",
              "title": "Privileged container",
              "type": "boolean"
            }
          },
          "required": [],
          "title": "Capabilities that must be available/enabled for the task container.",
          "type": "object"
        },
        "command": {
          "default": [],
          "description": "Example: `['/bin/bash', '-c', 'ls']`.",
          "items": {
            "type": "string"
          },
          "title": "Docker command to run (see docker api).",
          "type": "array"
        },
        "env": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Example: ```\n{\n  \"PATH\": '/borked/path'\n  \"ENV_NAME\": \"VALUE\"\n}\n```",
          "title": "Environment variable mappings.",
          "type": "object"
        },
        "features": {
          "additionalProperties": false,
          "description": "Used to enable additional functionality.",
          "properties": {
            "allowPtrace": {
              "default": false,
              "description": "This allows you to use the Linux ptrace functionality inside the container; it is otherwise disallowed by Docker's security policy.",
              "title": "Allow ptrace within the container",
              "type": "boolean"
            },
            "artifacts": {
              "default": true,
              "description": "",
              "title": "Artifact uploads",
              "type": "boolean"
            },
            "bulkLog": {
              "default": true,
              "description": "Useful if live logging is not interesting but the overalllog is later on",
              "title": "Bulk upload the task log into a single artifact",
              "type": "boolean"
            },
            "chainOfTrust": {
              "default": false,
              "description": "Artifacts named chain-of-trust.json and chain-of-trust.json.sig should be generated which will include information for downstream tasks to build a level of trust for the artifacts produced by the task and the environment it ran in.",
              "title": "Enable generation of ed25519-signed Chain of Trust artifacts",
              "type": "boolean"
            },
            "interactive": {
              "default": false,
              "description": "This allows you to interactively run commands inside the container and attaches you to the stdin/stdout/stderr over a websocket. Can be used for SSH-like access to docker containers.",
              "title": "Docker Exec Interactive",
              "type": "boolean"
            },
            "localLiveLog": {
              "default": true,
              "description": "Logs are stored on the worker during the duration of tasks and available via http chunked streaming then uploaded to s3",
              "title": "Enable live logging (worker local)",
              "type": "boolean"
            },
            "taskclusterProxy": {
              "default": false,
              "description": "The auth proxy allows making requests to taskcluster/queue and taskcluster/scheduler directly from your task with the same scopes as set in the task. This can be used to make api calls via the [client](https://github.com/taskcluster/taskcluster-client) CURL, etc... Without embedding credentials in the task.",
              "title": "Taskcluster auth proxy service",
              "type": "boolean"
            }
          },
          "required": [],
          "title": "Docker Worker feature flags",
          "type": "object"
        },
        "image": {
          "description": "Image to use for the task.  Images can be specified as an image tag as used by a docker registry, or as an object declaring type and name/namespace",
          "oneOf": [
            {
              "title": "Docker image name",
              "type": "string"
            },
            {
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "docker-image"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "type",
                "name"
              ],
              "title": "Named docker image",
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "namespace": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "indexed-image"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "type",
                "namespace",
                "path"
              ],
              "title": "Indexed docker image",
              "type": "object"
            },
            {
              "additionalProperties": false,
              "properties": {
                "path": {
                  "type": "string"
                },
                "taskId": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "task-image"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "type",
                "taskId",
                "path"
              ],
              "title": "Docker image artifact",
              "type": "object"
            }
          ],
          "title": "Docker image."
        },
        "log": {
          "default": "public/logs/live.log",
          "description": "Specifies a custom name for the livelog artifact. Note that this is also used in determining the name of the backing log artifact name. Backing log artifact name matches livelog artifact name with `_backing` appended, prior to the file extension (if present). For example, `apple/banana.log.txt` results in livelog artifact `apple/banana.log.txt` and backing log artifact `apple/banana.log_backing.txt`. Defaults to `public/logs/live.log`.",
          "title": "Livelog artifact name",
          "type": "string"
        },
        "maxRunTime": {
          "description": "Maximum time the task container can run in seconds.",
          "minimum": 1,
          "multipleOf": 1,
          "title": "Maximum run time in seconds",
          "type": "integer"
        },
        "onExitStatus": {
          "additionalProperties": false,
          "description": "By default docker-worker will fail a task with a non-zero exit status without retrying.  This payload property allows a task owner to define certain exit statuses that will be marked as a retriable exception.",
          "properties": {
            "purgeCaches": {
              "description": "If the task exits with a purge caches exit status, all caches associated with the task will be purged.",
              "items": {
                "title": "Exit statuses",
                "type": "integer"
              },
              "title": "Purge caches exit status",
              "type": "array"
            },
            "retry": {
              "description": "If the task exits with a retriable exit status, the task will be marked as an exception and a new run created.",
              "items": {
                "title": "Exit statuses",
                "type": "integer"
              },
              "title": "Retriable exit statuses",
              "type": "array"
            }
          },
          "required": [],
          "title": "Exit status handling",
          "type": "object"
        },
        "supersederUrl": {
          "description": "Maintained for backward compatibility, but no longer used",
          "title": "(unused)",
          "type": "string"
        }
      },
      "required": [
        "image",
        "maxRunTime"
      ],
      "title": "Docker worker payload",
      "type": "object"
    }
  ],
  "title": "Payload - multiuser, posix"
}