Packaging and publishing a Podman Desktop extension
To enable users to install your extension, consider publishing your extension to an Open Container Initiative (OCI) image registry.
Prerequisites
The extension builds successfully. See Writing a Podman Desktop extension.
All runtime dependencies are inside the final binary.
An OCI image registry to publish to, such as
quay.io/fbenoit/my-first-extension
.(Optional) The OCI image registry is public to enable anybody to fetch the image.
Procedure
Create and edit a
Containerfile
file.Use a scratch image. The extension requires no runtime:
FROM scratch
Apply mandatory Podman Desktop metadata on the
OCI
image:LABEL org.opencontainers.image.title="My first extension" \
org.opencontainers.image.description="Example of extension" \
org.opencontainers.image.vendor="podman-desktop" \
io.podman-desktop.api.version=">= 0.12.0"io.podman-desktop.api.version=">= 0.12.0"
sets the minimal Podman Desktop version that the extension requires to run.Copy the extension assembly, including the metadata, icon, and production binary, to the
/extension
folder inside the image:COPY package.json /extension/
COPY icon.png /extension/
COPY dist /extension/distBuild an image:
$ podman build -t quay.io/fbenoit/my-first-extension .
Push the image and manifest to the OCI image registry:
$ podman push quay.io/fbenoit/my-first-extension