Skip to content
Open
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
48 changes: 46 additions & 2 deletions magic-containers/bunny-container-registry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Bunny Container Registry is in **Preview**. Usage is temporarily free during the

Bunny Container Registry is a private, OCI-compliant container registry built into bunny.net. Push images from your machine or CI pipeline and they immediately show up in the Magic Containers image list, ready to deploy. No external registry or credential setup required.

The registry is available at `registry.bunny.net`. Repositories are private to your account and namespaced by your account ID (`<account-id>/my-app`). The [bunny.net CLI](/cli) manages this namespace for you, so you only need your account ID when [pushing with Docker directly](#pushing-with-docker).
The registry is available at `registry.bunny.net`. Repositories are private to your account and namespaced by your account ID (`<account-id>/my-app`). The [bunny.net CLI](/cli) manages this namespace for you, so you only need your account ID when pushing with [Docker](#pushing-with-docker) or [Apple Container](#pushing-with-apple-container) directly.

<Info>
Magic Containers only supports images built for the **linux/amd64** architecture. When building your container image, ensure you target this platform using `--platform linux/amd64`.
Expand Down Expand Up @@ -44,7 +44,7 @@ Push a local Docker image by name. The CLI tags it for the registry and pushes i
bunny registry push my-app:latest
```

`push` shells out to the Docker CLI, so Docker must be installed and the image must exist in Docker's image store.
`push` shells out to the Docker CLI, so Docker must be installed and the image must exist in Docker's image store. Images built with Apple Container aren't visible to Docker; push those with [`container image push`](#pushing-with-apple-container) instead.

</Step>

Expand Down Expand Up @@ -132,6 +132,50 @@ Once pushed, the image appears in the Magic Containers image list, where you can

</Steps>

## Pushing with Apple Container

[Apple Container](https://github.com/apple/container) is Apple's open-source container tool for macOS. Its registry commands work with the Bunny Container Registry the same way Docker's do: you handle authentication and the account namespace yourself.

<Steps>

<Step title="Log in to the registry">

Authenticate with `token` as the username and your [API key](/account/api-keys) as the password:

```bash
container registry login registry.bunny.net --username token
```

</Step>

<Step title="Build for linux/amd64">

On Apple silicon, Apple Container builds images for `arm64` by default, which Magic Containers can't run. Pass `--arch amd64` when building:

```bash
container build --arch amd64 --tag registry.bunny.net/<account-id>/my-app:latest .
```

If you already have an image built for `amd64`, tag it with the registry host and your account ID instead:

```bash
container image tag my-app registry.bunny.net/<account-id>/my-app:latest
```

</Step>

<Step title="Push the image">

```bash
container image push registry.bunny.net/<account-id>/my-app:latest
```

Once pushed, the image appears in the Magic Containers image list, where you can select it to deploy.

</Step>

</Steps>

## Deploying pushed images

Images pushed to the Bunny Container Registry appear automatically in the image list when you [deploy](/magic-containers/deploy) or [update](/magic-containers/update) a Magic Containers app. Select the repository and tag to deploy; no registry credentials need to be configured.
Expand Down