docs/versioned_docs/version-0.17.2/ci/quickstart/publish.mdx
import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem";
The end stage of the example pipeline is the publish stage, which publishes the container image to a registry.
Just as you can call Dagger Functions individually from the CLI, you can also call (and combine) them using a programming language. This Dagger Function is an example. It is a higher-level function which orchestrates the Dagger Functions in previous sections and the core Dagger API to:
:::tip COMBINING DAGGER FUNCTIONS
There are various reasons why you might want to write Dagger Functions that call other Dagger Functions. A common reason is that when developing locally, it's quicker and easier to trigger your pipeline using a single command (dagger -c 'publish ...') instead of multiple commands (dagger -c 'test ... && build ... && ...').
:::
Call the Dagger Function:
<Tabs groupId="shell"> <TabItem value="System shell"> ```shell dagger -c publish ``` </TabItem> <TabItem value="Dagger Shell"> ```shell title="First type 'dagger' for interactive mode." publish ``` </TabItem> </Tabs>You should see the application being tested, built, and published to the ttl.sh container registry:
You can test the published container image by pulling and running it with docker run:
:::tip FUNCTION CHAINING Function chaining works the same way, whether you're writing Dagger Function code using a Dagger SDK or invoking a Dagger Function using Dagger Shell. The following are equivalent:
<Tabs groupId="language"> <TabItem value="Go">