Skip to main content

Container Publication to a Registry

Every Container object exposes a Publish() function, which publishes the container as a new image to a specified container registry. The registry address is passed to the function using the --address argument, and the return value is a string referencing the container image address in the registry.

Here is an example of publishing the container returned by a Wolfi container builder Dagger Function to the ttl.sh registry, by chaining a Publish() function call to the container:

dagger call -m github.com/shykes/daggerverse/wolfi@v0.1.4 container publish --address=ttl.sh/my-wolfi