Minor extension docs improvement (#16516)

* Minor extension docs improvement

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>

* Apply suggestions from code review

Co-authored-by: Lucas Bernalte <lucas.bernalte@gmail.com>

* Update desktop/extensions-sdk/build/frontend-extension-tutorial.md

Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Co-authored-by: Lucas Bernalte <lucas.bernalte@gmail.com>
Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
This commit is contained in:
Guillaume Tardif 2023-01-13 14:55:51 +01:00 committed by GitHub
parent da91c82430
commit fe91aafd89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -17,7 +17,7 @@ why and how to add a backend.
> Note
>
> If you want to start a codebase for your new extension, our [Quickstart guide](../quickstart.md) and `docker extension init <my-extension>` provides a better base for your extension as it is more up-to-date and related to your install of Docker Desktop.
> Check the [Quickstart guide](../quickstart.md) and `docker extension init <my-extension>`. They provide a better base for your extension as it's more up-to-date and related to your install of Docker Desktop.
## Why add a backend?

View File

@ -92,7 +92,7 @@ FROM alpine
LABEL org.opencontainers.image.title="My extension" \
org.opencontainers.image.description="Your Desktop Extension Description" \
org.opencontainers.image.vendor="Awesome Inc." \
com.docker.desktop.extension.api.version="0.3.0" \
com.docker.desktop.extension.api.version="0.3.3" \
com.docker.desktop.extension.icon="https://www.docker.com/wp-content/uploads/2022/03/Moby-logo.png" \
com.docker.extension.screenshots="" \
com.docker.extension.detailed-description="" \
@ -142,6 +142,10 @@ COPY --from=client-builder /ui/build ui
</div>
</div>
> Note
>
> In the example Dockerfile, you can see that the image label `com.docker.desktop.extension.icon` is set to an icon URL. The Extensions Marketplace displays this icon without installing the extension. The Dockerfile also includes `COPY docker.svg .` to copy an icon file inside the image. This second icon file is used to display the extension UI in the Dashboard, once the extension is installed.
## Configure the metadata file
In order to add a tab in Docker Desktop for your extension, you have to configure it in the `metadata.json`

View File

@ -40,7 +40,7 @@ Although you can start from an empty directory, it is highly recommended that yo
At a minimum, your Dockerfile needs:
- Labels which provide extra information about the extension.
- [Labels](../extensions/labels.md) which provide extra information about the extension, icon and screenshots.
- The source code which in this case is an `index.html` that sits within the `ui` folder.
- The `metadata.json` file.
@ -51,7 +51,7 @@ FROM scratch
LABEL org.opencontainers.image.title="Minimal frontend" \
org.opencontainers.image.description="A sample extension to show how easy it's to get started with Desktop Extensions." \
org.opencontainers.image.vendor="Awesome Inc." \
com.docker.desktop.extension.api.version="0.3.0" \
com.docker.desktop.extension.api.version="0.3.3" \
com.docker.desktop.extension.icon="https://www.docker.com/wp-content/uploads/2022/03/Moby-logo.png"
COPY ui ./ui

View File

@ -93,7 +93,7 @@ FROM alpine
LABEL org.opencontainers.image.title="example-extension" \
org.opencontainers.image.description="My Example Extension" \
org.opencontainers.image.vendor="Docker Inc." \
com.docker.desktop.extension.api.version=">= 0.1.0"
com.docker.desktop.extension.api.version=">= 0.3.3"
COPY --from=dl /out /
```