diff --git a/desktop/extensions-sdk/extensions/images/hub-multi-arch-extension.png b/desktop/extensions-sdk/extensions/images/hub-multi-arch-extension.png deleted file mode 100644 index de7f6226cf..0000000000 Binary files a/desktop/extensions-sdk/extensions/images/hub-multi-arch-extension.png and /dev/null differ diff --git a/desktop/extensions-sdk/extensions/multi-arch.md b/desktop/extensions-sdk/extensions/multi-arch.md index cc8d910b86..93a27f23f6 100644 --- a/desktop/extensions-sdk/extensions/multi-arch.md +++ b/desktop/extensions-sdk/extensions/multi-arch.md @@ -13,25 +13,48 @@ Docker Desktop retrieves the extension image according to the user’s system ar ### Build and push for multiple architectures -If you created an extension from the `docker extension init` command, the `Makefile` at the root of the directory includes a target with name `push-extension`. +If you created an extension from the `docker extension init` command, the +`Makefile` at the root of the directory includes a target with name +`push-extension`. -You can do `make push-extension` to build your extension against both `linux/amd64` and `linux/arm64` platforms, and push them to DockerHub. For example: +You can do `make push-extension` to build your extension against both +`linux/amd64` and `linux/arm64` platforms, and push them to DockerHub. -`docker buildx build --platform=linux/amd64,linux/arm64 -t .` - -Alternatively, if you started from an empty directory, use the command below to build your extension for multiple architectures: - -``` -docker buildx build \ - --push \ - --platform=linux/amd64,linux/arm64 \ - --tag=my-extension:0.0.1 . +For example: +```console +$ make push-extension ``` -The information above serves as a guide to help you get started. It’s up to you to define the CI/CD process to build and push the extension. +Alternatively, if you started from an empty directory, use the command below +to build your extension for multiple architectures: -![hub-multi-arch-extension](images/hub-multi-arch-extension.png) +```console +$ docker buildx build --push --platform=linux/amd64,linux/arm64 --tag=username/my-extension:0.0.1 . +``` + +You can then check the image manifest to see if the image is available for both +architectures using the [`docker buildx imagetools` command](../../../engine/reference/commandline/buildx_imagetools.md): + +```console +$ docker buildx imagetools inspect username/my-extension:0.0.1 +Name: docker.io/username/my-extension:0.0.1 +MediaType: application/vnd.docker.distribution.manifest.list.v2+json +Digest: sha256:f3b552e65508d9203b46db507bb121f1b644e53a22f851185d8e53d873417c48 + +Manifests: + Name: docker.io/username/my-extension:0.0.1@sha256:71d7ecf3cd12d9a99e73ef448bf63ae12751fe3a436a007cb0969f0dc4184c8c + MediaType: application/vnd.docker.distribution.manifest.v2+json + Platform: linux/amd64 + + Name: docker.io/username/my-extension:0.0.1@sha256:5ba4ceea65579fdd1181dfa103cc437d8e19d87239683cf5040e633211387ccf + MediaType: application/vnd.docker.distribution.manifest.v2+json + Platform: linux/arm64 +``` + +> **Note** +> +> For more information, see [Multi-platform images](../../../build/building/multi-platform.md) page. ### Adding multi-arch binaries