Skip to main content
Version: 1.0

Publish

Once you're finished iterating on your application component, you can publish it to any OCI compliant registry that supports artifacts. Throughout our examples and wasmCloud official artifacts we use Docker Hub, AzureCR, and GitHub CR, but other registries should work as well. For local development and testing of the flow, refer to the Running a local OCI registry section to run a local registry in a Docker container.

Once you have a registry available, you can use the wash push and wash pull commands to push and pull components from OCI registries. For example, to pull a wasmCloud example locally:

bash
wash pull wasmcloud.azurecr.io/hello:0.1.7

If you're working with an unauthenticated registry, you can directly push artifacts to it by specifying an image reference and the local file:

bash
wash push localhost:5000/v2/wasmcloud/hello:0.1.7 ./hello.wasm

Authenticated Registries

If you're working with an OCI registry that requires credentials, wash supports basic authentication via the --username and --password flags. Alternatively, you may opt to export your credentials as environment variables to avoid exposing them on the command line. This method of authentication works for both pushing and pulling.

bash
export WASH_REG_USER=wasmcloud
export WASH_REG_PASSWORD=supersecret
wash push wasmcloud.azurecr.io/hello:0.1.7 ./hello.wasm

If your wasmCloud host is pulling from a registry that requires credentials, you can specify them when starting the host:

bash
export OCI_REGISTRY=ghcr.io
export OCI_REGISTRY_USER=myusername
export OCI_REGISTRY_PASSWORD=mys3cretper5onaltoken
wash up