Skip to content

Files

Latest commit

 

History

History
100 lines (73 loc) · 3.63 KB

index.md

File metadata and controls

100 lines (73 loc) · 3.63 KB
title description keywords
Extensions SDK documentation
Overall index for Docker Extensions SDK documentation
Docker, Extensions, sdk

Docker Extension SDK

Use the resources in this section to create your own Docker Extension.

This work is experimental and still in progress. The features and APIs detailed below are subject to change. {: .warning}

Overview

Extensions are packaged as specially formatted Docker images, which our CLI tool helps to build. At the root of the image filesystem is a metadata.json file which describes the content of the extension. It is a fundamental element of a Docker extension.

An extension can contain a UI part and backend parts that run either on the host or in the Desktop virtual machine. For further details, see Extension metadata.

Extensions are distributed through the Docker Hub. Development of extensions can be done locally without the need to push the extension to Docker Hub. See Extensions distribution for further details.

Prerequisites

Before you create your own extension, you need a specific Docker Desktop build that comes with extension capabilities.

From the releases page, install both the Docker Desktop build and the Extensions CLI which is used to manage extensions later on.

Using the CLI to install unpublished extensions

Extensions can install binaries, invoke commands and access files on your machine. Make sure you trust extensions before installing them on your machine. {: .warning}

Once you've downloaded the Extensions CLI, extract the binary in to ~/.docker/cli-plugins.

In your terminal, run:

  • MacOS (intel)
  • MacOS (M1)
  • Windows
  • WSL2
  • Linux
```console
tar -xvzf desktop-extension-cli-darwin-amd64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-extension ~/.docker/cli-plugins
```

```console
tar -xvzf desktop-extension-cli-darwin-arm64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-extension ~/.docker/cli-plugins
```

```powershell
tar -xvzf desktop-extension-cli-windows-amd64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-extension.exe ~/.docker/cli-plugins
```

```console
tar -xvzf desktop-extension-cli-linux-amd64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-extension ~/.docker/cli-plugins
```

```console
tar -xvzf desktop-extension-cli-linux-amd64.tar.gz
mkdir -p ~/.docker/cli-plugins
mv docker-extension ~/.docker/cli-plugins
```

You can now list installed extensions (the list should be empty if you have not installed extensions already):

docker extension ls
ID                  PROVIDER            VERSION             UI                  VM                  HOST

Extensions enabled