Wasm Shell and OCI Registries
Wasm Shell enables component developers to push WebAssembly components to Open Container Initiative (OCI) registries as standard OCI artifacts, and to pull component artifacts from registries.
OCI artifacts include a wide range of content types such as WebAssembly components, Software Bill of Materials (SBOMs), and Helm charts as well as container images.
Authenticating to OCI registries
wash
supports loading Docker credentials. There are multiple ways to authenticate with Docker credentials, including the docker login
command with the docker CLI:
shell
docker login <registry> -u <username> -p <password-or-token>
How to push a WebAssembly component to an OCI registry
Push the component to your registry:
shell
wash oci push ghcr.io/cosmonic-labs/components/hello:0.2.0 ./dist/http-hello-world.wasm
- The target registry address (including artifact name and tag) are specified for the first option with
wash oci push
. - The second option defines the target path for the component binary to push.
How to pull a WebAssembly component from an OCI registry
Pull the component from your registry:
shell
wash oci pull ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
Further reading
wash
uses theoras
client library (Rust) for OCI functionality. See theoras
documentation for more information.- Learn more about the OCI standard at https://opencontainers.org/.