C.W.K.
Stream
Lesson 06 of 07 · published

OCI 표준 — 왜 lock-in 안 되냐

~12 min · foundations, standards

Level 0Container 호기심
0 XP0/36 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

스펙 둘, 산업 하나

Open Container Initiative (OCI) 는 Linux Foundation 프로젝트로 두 가지 표준화:

  1. Image Specification — container image 가 어떻게 구성되냐: manifest, config, layer, digest.
  2. Runtime Specification — runtime 이 bundle 에서 container 를 어떻게 만들고 돌리냐.

Docker 도 Image Spec 만족하는 image 를 빌드. Podman 도. Docker (runc 통해서) 도 Runtime Spec 호환 runtime 사용. Kubernetes (containerd 통해서) 도 마찬가지. 한 번 빌드한 image 는 OCI 지키는 어디서든 굴러.

OCI image 해부

  • Manifest — config 와 layer (각각 digest) 를 나열한 JSON 문서.
  • Config — runtime 기본값: CMD, ENV, exposed port, working directory, user.
  • Layer — gzip 으로 압축된 filesystem diff tarball. OverlayFS 로 stack 해서 실행 filesystem 만듦.
  • Digest — SHA-256 해시. layer digest 같은 image 두 개는 디스크에서 layer 공유. 재현성 내장.

운영적으로 왜 중요하냐

노트북에서 Docker 로 빌드해. GitHub Container Registry 로 푸시해. Kubernetes (containerd 사용) 에서 pull-and-run 해. 이 체인 어디에도 Docker 회사 필요 없어. 스펙 이 모두가 동의한 거니까 artifact 가 portable.

Code

Image manifest 직접 보기·bash
# Pull and inspect the manifest of a public image
docker buildx imagetools inspect --raw nginx:1.27-alpine | head -30

# Returns a JSON manifest with mediaType, config (digest, size),
# and layers (each with digest + size).

# Layer digests are the deduplication key —
# any two images sharing a layer share one copy on disk.

External links

Exercise

같은 image 를 두 도구로 pull (예: docker pullnerdctl pull, 또는 docker pullpodman pull). 각각 찍어주는 digest 비교. 일치해야 해. 한 문장으로 — 그 일치가 OCI 스펙이 일하고 있다는 뜻인 이유 설명.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.