Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,12 @@
"fileMatch": ["dockerd.json", "docker.json"],
"url": "https://www.schemastore.org/dockerd.json"
},
{
"name": "Docker Desktop extension metadata",
"description": "Docker Desktop extension metadata configuration file. Documentation: https://docs.docker.com/extensions/extensions-sdk/architecture/metadata/",
"fileMatch": ["metadata.json"],
"url": "https://www.schemastore.org/docker-extension-metadata.json"
},
{
"name": "docker bake",
"description": "Docker Bake configuration file. Documentation: https://docs.docker.com/build/bake/reference",
Expand Down
113 changes: 113 additions & 0 deletions src/schemas/json/docker-extension-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/docker-extension-metadata.json",
"title": "Metadata configuration schema for Docker Desktop extensions",
"definitions": {
"binariesOnVMHost": {
"type": "array",
"title": "Configuration schema for binaries that will be copied by Docker Desktop from the image onto the host machine.",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"title": "String path to the binary on the image.",
"description": "The path to the binary in the extension's image."
}
}
}
}
},
"type": "object",
"description": "Docker Desktop extension.",
"properties": {
"icon": {
"type": "string",
"description": "The icon for the extension. Will be displayed on the sidebar, in the extension list and on Docker Hub."
},
"ui": {
"type": "object",
"description": "UI configuration for your extension.",
"properties": {
"dashboard-tab": {
"type": "object",
"description": "Dashboard tab UI configuration.",
"properties": {
"title": {
"type": "string",
"description": "The name of your extension, that will be displayed in the dashboard."
},
"root": {
"type": "string",
"description": "The root folder (in your extension's image) where your UI code is stored."
},
"src": {
"type": "string",
"description": "The HTML entrypoint for the extension tab."
}
},
"required": ["title", "src"]
}
}
},
"vm": {
"type": "object",
"description": "Backend configuration for your extension.",
"properties": {
"image": {
"type": "string",
"description": "The image to use for your extension. A default compose file will be generated for your extension. If you want to use the same image that packages your extension, use ${DESKTOP_PLUGIN_IMAGE}."
},
"composefile": {
"type": "string",
"description": "A path to your Docker compose file for your backend container."
}
}
},
"host": {
"type": "object",
"description": "Host configuration for your extension.",
"properties": {
"binaries": {
"type": "array",
"description": "An array of binaries that Docker Desktop will copy from the extension image onto the host machine. These binaries can be invoked by your extension using the JavaScript API in your frontend. Docker Desktop automatically handles transfer of binaries for you. For more information, see https://docs.docker.com/extensions/extensions-sdk/guides/invoke-host-binaries/",
"items": {
"type": "object",
"properties": {
"darwin": {
"allOf": [
{
"$ref": "#/definitions/binariesOnVMHost"
},
{
"description": "Binaries that will be copied over on host machines running MacOS."
}
]
},
"windows": {
"allOf": [
{
"$ref": "#/definitions/binariesOnVMHost"
},
{
"description": "Binaries that will be copied over on host machines running Windows."
}
]
},
"linux": {
"allOf": [
{
"$ref": "#/definitions/binariesOnVMHost"
},
{
"description": "Binaries that will be copied over on host machines running Linux."
}
]
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "../../schemas/json/docker-extension-metadata.json",
"host": {
"binaries": [
{
"darwin": [
{
"path": "/darwin/binary"
}
],
"linux": [
{
"path": "/linux/binary"
}
],
"windows": [
{
"path": "/windows/binary.exe"
}
]
}
]
},
"icon": "extension-icon.svg",
"ui": {
"dashboard-tab": {
"root": "/ui",
"src": "index.html",
"title": "MyTitle"
}
},
"vm": {
"composefile": "docker-compose.yml",
"image": "${DESKTOP_PLUGIN_IMAGE}"
}
}
Loading