# Apple Container OCI Compatibility: Full Technical Specification

> Discover Apple Container's full OCI compatibility. Effortlessly create and consume standard Open Container Initiative images with Docker, Podman, and OCI registries.

- Repository: [Apple/container](https://github.com/apple/container)
- Tags: api-reference
- Published: 2026-06-28

---

**Apple Container provides complete OCI compatibility, enabling the tool to consume and produce standard Open Container Initiative images that work seamlessly with Docker, Podman, and any OCI-compliant container registry.**

Apple Container is Apple's open-source Swift-based container runtime that implements Open Container Initiative (OCI) specifications for both image format and runtime behavior. The project delivers full **OCI compatibility** by adhering to standard image layouts, configuration JSON formats, and manifest specifications defined by the OCI. This technical implementation ensures that containers built with Apple's tooling interoperate with the broader container ecosystem without format conversion or proprietary extensions.

## OCI Image Specification Implementation

Apple Container implements the OCI Image Specification through its core `Containerization` framework, defined in [`Package.swift`](https://github.com/apple/container/blob/main/Package.swift). This implementation provides native support for standard image layouts, enabling the runtime to parse OCI image configurations and manifests correctly.

### Consuming Standard OCI Images

The runtime can execute any OCI-compliant image pulled from standard container registries. According to [`docs/technical-overview.md`](https://github.com/apple/container/blob/main/docs/technical-overview.md) (lines 20-33), "Since `container` consumes and produces standard OCI images, you can easily build with and run images produced by other container applications." The tool recognizes the standard image layout, configuration JSON, and manifest format defined by the OCI, allowing it to pull and run images from Docker Hub, GitHub Packages, or Azure Container Registry.

### Producing OCI-Compatible Output

When building images, Apple Container generates output that conforms strictly to OCI standards. As documented in [`README.md`](https://github.com/apple/container/blob/main/README.md) (lines 8-9), "The tool consumes and produces OCI-compatible container images … you can pull and run images from any standard container registry." This means images built using `container build` can be pushed to any OCI-compliant registry and executed by Docker, Podman, BuildKit, or other OCI-aware tools.

## Runtime Interoperability

The OCI compatibility extends beyond image format to runtime behavior, ensuring seamless integration with existing container workflows.

### Cross-Platform Compatibility

Images produced by Apple Container use the same format as Docker, Podman, and BuildKit. The [`docs/technical-overview.md`](https://github.com/apple/container/blob/main/docs/technical-overview.md) documentation confirms that "the images that you build will run everywhere" within the OCI ecosystem. This interoperability includes support for Dockerfile syntax (also referred to as Containerfile) as build inputs, allowing migration from existing container workflows without modification to build definitions.

### Container Machine Support

As detailed in [`docs/container-machine.md`](https://github.com/apple/container/blob/main/docs/container-machine.md), Apple Container's virtual machine infrastructure is built from standard OCI images. This architectural decision ensures that container machines maintain the same compatibility guarantees as standard container workloads, using the identical image layout and configuration schema.

## Working with OCI Images

The `container` CLI commands operate directly on OCI-compliant images. The available commands documented in [`docs/command-reference.md`](https://github.com/apple/container/blob/main/docs/command-reference.md) include:

- `container build`: Generates OCI-compatible images from Dockerfiles
- `container run`: Executes OCI images using the standard runtime
- `container push`: Distributes images to OCI-compliant registries

### Practical Examples

```bash

# Build an OCI‑compatible image from a Dockerfile

container build -t myapp:latest .

# Run the image (the runtime expects an OCI image)

container run myapp:latest

# Push the image to an OCI‑compatible registry

container push myapp:latest ghcr.io/yourorg/myapp:latest

```

These commands utilize the underlying OCI image layout implementation, ensuring compatibility with Docker, Podman, or any OCI-compliant tool.

## Implementation Architecture

The OCI compatibility is implemented through the `Containerization` framework, a Swift package dependency defined in [`Package.swift`](https://github.com/apple/container/blob/main/Package.swift). This framework handles OCI image parsing, manifest generation, and runtime configuration according to OCI specifications.

The architecture separates concerns between image management (handled by the `Containerization` framework) and CLI operations (documented in [`docs/command-reference.md`](https://github.com/apple/container/blob/main/docs/command-reference.md)). This separation ensures that all image operations maintain OCI compliance at the library level, not just at the CLI interface.

## Summary

- Apple Container implements full OCI Image and Runtime specifications through its `Containerization` framework defined in [`Package.swift`](https://github.com/apple/container/blob/main/Package.swift).
- The tool **consumes** standard OCI images from any compliant registry, as documented in [`docs/technical-overview.md`](https://github.com/apple/container/blob/main/docs/technical-overview.md).
- The tool **produces** OCI-compatible images that work with Docker, Podman, and BuildKit.
- All CLI commands (`container build`, `container run`, `container push`) operate on standard OCI image layouts.
- Images can be distributed to any OCI-compliant registry including Docker Hub, GitHub Packages, and Azure Container Registry.

## Frequently Asked Questions

### Can Apple Container run Docker images?

Yes. Apple Container's OCI compatibility allows it to run any image that conforms to the Open Container Initiative specifications. Since Docker images are OCI-compliant, they can be executed directly using `container run` without conversion or modification.

### Can I push images built with Apple Container to Docker Hub?

Yes. The `container push` command produces standard OCI images that can be pushed to any OCI-compatible registry, including Docker Hub, GitHub Packages, and Azure Container Registry. The images follow the standard manifest format and configuration JSON schema required by these registries.

### What specific OCI specifications does Apple Container implement?

Apple Container implements the OCI Image Specification for image layout, configuration, and manifest formats. According to the source documentation in [`docs/technical-overview.md`](https://github.com/apple/container/blob/main/docs/technical-overview.md) (lines 20-33) and [`README.md`](https://github.com/apple/container/blob/main/README.md) (lines 8-9), the tool handles standard image layouts, configuration JSON, and manifest formats defined by the Open Container Initiative.

### Does Apple Container support Dockerfiles for building images?

Yes. Apple Container accepts Dockerfiles (also referred to as Containerfiles) as build inputs for the `container build` command. The resulting output is an OCI-compatible image that maintains interoperability with the broader container ecosystem.