Workspace IndexKnowledge Notes › Apple container

#202PoC

Apple container

Apple's official open-source tool for running Linux containers as lightweight VMs on Apple Silicon — a Docker Desktop alternative candidate.

Not yet scoped. github.com/apple/container

Why

A Docker Desktop alternative candidate for local infra across two PCs and midnight automated jobs.

How it works

Apple's official open source — runs Linux containers as lightweight VMs on Apple Silicon Macs. Written in Swift, OCI-compatible (pulls/pushes Docker images as-is), at 1.0.0, requires macOS 26.

Related code

"""Apple `container`: parse an OCI image reference and mock a pull + run,
illustrating the "container run <image>" mental model (no real container ops).
"""
from dataclasses import dataclass


@dataclass
class ImageRef:
    name: str
    tag: str

    @classmethod
    def parse(cls, ref):
        if ":" in ref:
            name, tag = ref.rsplit(":", 1)
        else:
            name, tag = ref, "latest"
        return cls(name=name, tag=tag)

    def __str__(self):
        return f"{self.name}:{self.tag}"


def pull(image: ImageRef):
    print(f"$ container pull {image}")
    print(f"  -> resolving OCI manifest for {image.name}, tag={image.tag}")
    print(f"  -> layers fetched (mocked), image ready as lightweight VM image")


def run(image: ImageRef, command):
    print(f"$ container run {image} {' '.join(command)}")
    print(f"  -> booting lightweight Linux VM on Apple Silicon (mocked)")
    print(f"  -> exec: {' '.join(command)}")
    return {"exit_code": 0, "stdout": "hello from inside the container (mocked)"}


for ref in ["nginx:1.27", "alpine"]:
    image = ImageRef.parse(ref)
    pull(image)
    result = run(image, ["echo", "hello"])
    print(f"  exit_code={result['exit_code']} stdout={result['stdout']!r}\n")

Where it lands in Jayverse

  • CI/Devnet: evaluate Apple container as a Docker Desktop replacement for local Anvil runs and midnight automated jobs on the two-PC setup. Check OCI compatibility with existing pinned images before switching either machine.
  • gitboard: if adopted, add container runtime (Docker vs Apple container) as a per-machine dashboard field. macOS 26 is a hard requirement, so mixed-runtime machines need to be visible, not assumed.

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
lightweight경량의 · 가상머신을 가볍게 구현했다는 의미 · "running Linux containers as lightweight VMs"
OCI-compatibleOCI 표준 호환(컨테이너 이미지 규격 호환) · 도커 이미지를 그대로 쓸 수 있음을 뜻함 · "OCI-compatible (pulls/pushes Docker images as-is)"
as-is있는 그대로·수정 없이 · 기존 도커 이미지를 변환 없이 쓸 수 있다는 뜻 · "pulls/pushes Docker images as-is"
alternative candidate대안 후보 · 기존 도구를 대체할 수 있는 유력한 선택지를 가리킬 때 · "a Docker Desktop alternative candidate"
official open source회사가 직접 공개·관리하는 공식 오픈소스 · 신뢰성을 강조할 때 · "Apple's official open source"
OCI개방형 컨테이너 이니셔티브(Open Container Initiative) · 컨테이너 이미지·런타임 표준을 정의하는 규격 · "OCI-compatible (pulls/pushes Docker images as-is)"

← All Knowledge Notes · Workspace Index · Top ↑

Apple `container` 써보기

애플 공식 오픈소스 — Mac(Apple Silicon)에서 Linux 컨테이너를 경량 VM으로 실행 — Docker Desktop 대안 검토.

아직 범위 미정. github.com/apple/container

Docker Desktop 대안 검토 — 2대 PC·자정 자동작업의 로컬 인프라 후보.

동작 방식

애플 공식 오픈소스 — Mac(Apple Silicon)에서 Linux 컨테이너를 경량 VM으로 실행. Swift 제작 · OCI 호환(Docker 이미지 그대로 pull/push) · 1.0.0 릴리스 · macOS 26 필요.

관련 코드

"""Apple `container`: parse an OCI image reference and mock a pull + run,
illustrating the "container run <image>" mental model (no real container ops).
"""
from dataclasses import dataclass


@dataclass
class ImageRef:
    name: str
    tag: str

    @classmethod
    def parse(cls, ref):
        if ":" in ref:
            name, tag = ref.rsplit(":", 1)
        else:
            name, tag = ref, "latest"
        return cls(name=name, tag=tag)

    def __str__(self):
        return f"{self.name}:{self.tag}"


def pull(image: ImageRef):
    print(f"$ container pull {image}")
    print(f"  -> resolving OCI manifest for {image.name}, tag={image.tag}")
    print(f"  -> layers fetched (mocked), image ready as lightweight VM image")


def run(image: ImageRef, command):
    print(f"$ container run {image} {' '.join(command)}")
    print(f"  -> booting lightweight Linux VM on Apple Silicon (mocked)")
    print(f"  -> exec: {' '.join(command)}")
    return {"exit_code": 0, "stdout": "hello from inside the container (mocked)"}


for ref in ["nginx:1.27", "alpine"]:
    image = ImageRef.parse(ref)
    pull(image)
    result = run(image, ["echo", "hello"])
    print(f"  exit_code={result['exit_code']} stdout={result['stdout']!r}\n")

Jayverse에서의 위치

  • CI/Devnet: 두 대의 PC에서 로컬 Anvil 실행과 자정 자동 작업을 위한 Docker Desktop 대체재로 Apple container를 평가한다. 어느 쪽이든 전환하기 전에 기존에 고정된 이미지들과의 OCI 호환성을 확인한다.
  • gitboard: 채택한다면 머신별 대시보드 필드로 컨테이너 런타임(Docker vs Apple container)을 추가한다. macOS 26이 필수 조건이므로, 런타임이 혼재된 머신을 가정이 아니라 눈에 보이게 만든다.

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
lightweight경량의 · 가상머신을 가볍게 구현했다는 의미 · "running Linux containers as lightweight VMs"
OCI-compatibleOCI 표준 호환(컨테이너 이미지 규격 호환) · 도커 이미지를 그대로 쓸 수 있음을 뜻함 · "OCI-compatible (pulls/pushes Docker images as-is)"
as-is있는 그대로·수정 없이 · 기존 도커 이미지를 변환 없이 쓸 수 있다는 뜻 · "pulls/pushes Docker images as-is"
alternative candidate대안 후보 · 기존 도구를 대체할 수 있는 유력한 선택지를 가리킬 때 · "a Docker Desktop alternative candidate"
official open source회사가 직접 공개·관리하는 공식 오픈소스 · 신뢰성을 강조할 때 · "Apple's official open source"
OCI개방형 컨테이너 이니셔티브(Open Container Initiative) · 컨테이너 이미지·런타임 표준을 정의하는 규격 · "OCI-compatible (pulls/pushes Docker images as-is)"

← 전체 기술 노트 · 워크스페이스 인덱스 · 맨 위 ↑