Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docs/current_docs/ci/integrations/apple-container.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
slug: /ci/integrations/apple-container
---

# Apple's Container Project

Dagger can be used with any OCI-compatible container runtime, including [`container` from Apple](https://github.com/apple/container).

:::warning
The support for Apple's `container` is still early and experimental.
:::

## How it works

By default, Dagger tries to invoke the `docker` executable at some points during the invocation of `dagger`. Since `container` is partially CLI-compatible with Docker, some functionality works out of the box, and there is a way to get running by combining a symbolic link named `docker` pointing to the `container` executable, together with the approach of [Custom Runner support](https://docs.dagger.io/configuration/custom-runner).

## Prerequisites

- `container` installed and API server running on the host system, through `container system start`.

## Example

To use `container` with Dagger:

- create a symbolic link in a superior `PATH` position as below:

```shell
sudo ln -s $(which container) /usr/local/bin/docker
```
Comment on lines +27 to +29

@jedevc jedevc Jun 30, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jpadams had an idea - would having a apple-container:// + apple-image:// prefix for _EXPERIMENTAL_DAGGER_RUNNER_HOST be useful here?

If so, happy to get that setup, it should be pretty simple.

Not quite sure on naming, but ideally it would work similarly to docker-image and docker-container.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jedevc I think that would be really helpful to have those as prefixes.

@jpadams jpadams Jun 30, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

But as we were discussing just now with @kpenfound and @jasonmccallister, it will likely be important to have a way for users to specify their container runtime (docker, podman, nerdctl + rancher desktop, nerdctl + lima, apple container, etc) so Dagger can manage the engine lifecycle.

For example, we mostly shell out to docker ps today to see if an engine is already running and parse out its version, while with Apple's container, even if you've got a symlink of docker->container then there is CLI-incompatibility:

  • docker ps ✅
  • container ps ❌

  • container ls ✅
  • docker ls ❌

- start the Dagger Engine using appropriate values for memory and cpus:
```shell
container run --rm -d \
--memory 16G \
--cpus 4 \
--name dagger-engine-custom \
registry.dagger.io/engine:v0.18.12
```
- set this env var wherever you want to reach your Dagger Engine:
```shell
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine-custom
```

:::info
there is no `container ps`, so use `container ls`
:::

## Resources

If you have any questions about additional ways to use `container` with Dagger, join our [Discord](https://discord.gg/dagger-io) and ask your questions in our [#macos channel](https://discord.com/channels/707636530424053791/1155969163282628639).

## About `container`

[`container`](https://github.com/apple/container) is a tool for creating and running Linux containers using lightweight virtual machines on a Mac. It is written in Swift, and optimized for Apple silicon.
11 changes: 11 additions & 0 deletions docs/current_docs/ci/integrations/container-runtimes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
slug: /ci/integrations/container-runtimes
---

import DocCardList from '@theme/DocCardList';

# Running Dagger Engine on Popular Container Runtimes

We ship Dagger Engine as an OCI image to make it easy to run anywhere you can run containers. This section shows you how to run Dagger Engine on popular container runtimes for dev machines and servers.

<DocCardList className="DocCardList--no-description"/>
21 changes: 17 additions & 4 deletions docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,25 @@ module.exports = {
"ci/integrations/tekton",
],
},
{
type: "category",
label: "Container Runtimes",
link: {
type: "doc",
id: "ci/integrations/container-runtimes",
},
collapsible: true,
collapsed: true,
items: [
"ci/integrations/kubernetes",
"ci/integrations/nerdctl",
"ci/integrations/openshift",
"ci/integrations/podman",
"ci/integrations/apple-container",
],
},
"ci/integrations/github",
"ci/integrations/google-cloud-run",
"ci/integrations/kubernetes",
"ci/integrations/nerdctl",
"ci/integrations/openshift",
"ci/integrations/podman",
],
},
{
Expand Down